{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e50abe1c",
   "metadata": {},
   "source": [
    "* 记录人：LZ\n",
    "* 时间：2022-4-19\n",
    "* week08: 地图API接口应用  \n",
    "* 学习资源：https://lbs.amap.com/api/webservice/guide/api/georegeo（地理编码）  \n",
    "https://lbs.amap.com/api/webservice/guide/api/search（POI搜索）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2d277c96",
   "metadata": {},
   "source": [
    "## Web服务API简介  \n",
    "高德Web服务API向开发者提供HTTP接口，开发者可通过这些接口使用各类型的地理数据服务，返回结果支持JSON和XML格式。\n",
    "\n",
    "Web服务API对所有用户开放。使用本组服务之前，需要申请应用Key。不同类型用户可获取不同的数据访问能力。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7872eddc",
   "metadata": {},
   "source": [
    "## 地理编码/逆地理编码  \n",
    "* 地理编码：将详细的结构化地址转换为高德经纬度坐标。  \n",
    "* 逆地理编码：将经纬度转换为详细结构化的地址，且返回附近周边的POI、AOI信息。  \n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c0872bad",
   "metadata": {},
   "source": [
    "### 地理编码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "ebd8aabc",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1.调用requests 模块（相当于打开一个浏览器）\n",
    "import requests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "27c4bfe5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 2.请求方法 GET\n",
    "\n",
    "# 3.请求的URL地址：https://restapi.amap.com/v3/geocode/geo?parameters\n",
    "geo_url = \"https://restapi.amap.com/v3/geocode/geo?parameters\"  \n",
    "\n",
    "# 4.请求参数（payload）\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"address\":\"广东省广州市从化区广州南方学院\"\n",
    "}\n",
    "# 5.发起请求\n",
    "r = requests.get(url=geo_url,params=payload)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "0fcd7a99",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "ef3d46ce",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'geocodes': [{'formatted_address': '广东省广州市从化区温泉镇中心大学南方学院',\n",
       "   'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'citycode': '020',\n",
       "   'city': '广州市',\n",
       "   'district': '从化区',\n",
       "   'township': [],\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'adcode': '440117',\n",
       "   'street': [],\n",
       "   'number': [],\n",
       "   'location': '113.678280,23.628439',\n",
       "   'level': '兴趣点'}]}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "844e0279",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.678280,23.628439'"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nf_location=r.json()[\"geocodes\"][0][\"location\"]\n",
    "nf_location"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cab70fa4",
   "metadata": {},
   "source": [
    "### 逆地理编码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "1bbe9c21",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'addressComponent': {'city': '广州市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '440117',\n",
       "   'district': '从化区',\n",
       "   'towncode': '440117100000',\n",
       "   'streetNumber': {'number': '24号',\n",
       "    'location': '113.677267,23.629149',\n",
       "    'direction': '西北',\n",
       "    'distance': '129.943',\n",
       "    'street': '博学路'},\n",
       "   'country': '中国',\n",
       "   'township': '温泉镇',\n",
       "   'businessAreas': [[]],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '020'},\n",
       "  'formatted_address': '广东省广州市从化区温泉镇博学路广州南方学院'},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： https://restapi.amap.com/v3/geocode/geo?parameters\n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"location\":nf_location\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=regeo_url, params=payload) \n",
    "r\n",
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "15d8ead5",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： \n",
    "regeo_url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"location\":nf_location,\n",
    "    \"extensions\":\"all\",  # 返回信息设置为可以选择的全部信息\n",
    "    \"poitype\":\"true\"    # 开启附近搜索POI\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=regeo_url, params=payload) \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "56737076",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'regeocode': {'formatted_address': '广东省广州市从化区温泉镇博学路广州南方学院',\n",
       "  'addressComponent': {'country': '中国',\n",
       "   'province': '广东省',\n",
       "   'city': '广州市',\n",
       "   'citycode': '020',\n",
       "   'district': '从化区',\n",
       "   'adcode': '440117',\n",
       "   'township': '温泉镇',\n",
       "   'towncode': '440117100000',\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'streetNumber': {'street': '博学路',\n",
       "    'number': '24号',\n",
       "    'location': '113.677267,23.629149',\n",
       "    'direction': '西北',\n",
       "    'distance': '129.943'},\n",
       "   'businessAreas': [[]]},\n",
       "  'pois': [{'id': 'B00140MR9A',\n",
       "    'name': '广州南方学院',\n",
       "    'type': '科教文化服务;学校;高等院校',\n",
       "    'tel': '020-87828988;020-61787331',\n",
       "    'direction': '北',\n",
       "    'distance': '470.792',\n",
       "    'location': '113.679257,23.632577',\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.450402',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFG4TAF2',\n",
       "    'name': '广州南方公寓',\n",
       "    'type': '商务住宅;商务住宅相关;商务住宅相关',\n",
       "    'tel': '13622768437',\n",
       "    'direction': '东南',\n",
       "    'distance': '102.617',\n",
       "    'location': '113.678983,23.627778',\n",
       "    'address': '温泉镇乌土村松浪队5号(近博学路)',\n",
       "    'poiweight': '0.237309',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0H6FA18J5',\n",
       "    'name': '保利半山花园',\n",
       "    'type': '商务住宅;住宅区;住宅区',\n",
       "    'tel': [],\n",
       "    'direction': '东南',\n",
       "    'distance': '139.054',\n",
       "    'location': '113.679358,23.627672',\n",
       "    'address': '从莞深高速(广州南方学院南侧)',\n",
       "    'poiweight': '0.223065',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B00140TWHT',\n",
       "    'name': '教工住宅1号',\n",
       "    'type': '商务住宅;住宅区;住宅小区',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '222.658',\n",
       "    'location': '113.678490,23.630432',\n",
       "    'address': '笃行路2',\n",
       "    'poiweight': '0.157653',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFHRJDM9',\n",
       "    'name': '中南公寓',\n",
       "    'type': '商务住宅;住宅区;住宅小区',\n",
       "    'tel': '13711245345',\n",
       "    'direction': '东南',\n",
       "    'distance': '231.223',\n",
       "    'location': '113.680340,23.627566',\n",
       "    'address': '中大南方学院南门1号',\n",
       "    'poiweight': '0.256152',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD588HJ',\n",
       "    'name': '广州南方学院教学楼4号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '242.901',\n",
       "    'location': '113.677460,23.630490',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFHZH0IK',\n",
       "    'name': '地下铁',\n",
       "    'type': '餐饮服务;冷饮店;冷饮店',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '74.1376',\n",
       "    'location': '113.677941,23.629029',\n",
       "    'address': '博学路广州南方学院综合楼内',\n",
       "    'poiweight': '0.17934',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU76L2',\n",
       "    'name': '广州南方学院2号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '280.003',\n",
       "    'location': '113.678211,23.630956',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKP838K',\n",
       "    'name': '教学楼3号(外国语学院)',\n",
       "    'type': '科教文化服务;学校;高等院校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '298.093',\n",
       "    'location': '113.677247,23.630947',\n",
       "    'address': '博学路25',\n",
       "    'poiweight': '0.191742',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKSF1FI',\n",
       "    'name': '香辣螺蛳粉',\n",
       "    'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "    'tel': '17820061022',\n",
       "    'direction': '西',\n",
       "    'distance': '209.206',\n",
       "    'location': '113.676231,23.628565',\n",
       "    'address': '广州南方学院西4123',\n",
       "    'poiweight': '0.209252',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU8NLD',\n",
       "    'name': '广州南方学院1号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '326.007',\n",
       "    'location': '113.678215,23.631370',\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLF90I2',\n",
       "    'name': '煌上煌酱鸭(南方学院店)',\n",
       "    'type': '餐饮服务;快餐厅;快餐厅',\n",
       "    'tel': '13712317721',\n",
       "    'direction': '东北',\n",
       "    'distance': '256.772',\n",
       "    'location': '113.679965,23.630156',\n",
       "    'address': '笃行路20、22、24号广州南方学院商业中心1层1F015',\n",
       "    'poiweight': '0.209448',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58UTU',\n",
       "    'name': '广州南方学院2号教学楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '346.352',\n",
       "    'location': '113.677060,23.631346',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.191229',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0H25SMRKP',\n",
       "    'name': '广州南方学院大礼堂',\n",
       "    'type': '科教文化服务;会展中心;会展中心',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '386.65',\n",
       "    'location': '113.680076,23.631502',\n",
       "    'address': '温泉大道882号',\n",
       "    'poiweight': '0.261624',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU92JD',\n",
       "    'name': '广州南方学院教学楼1号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '391.548',\n",
       "    'location': '113.677077,23.631783',\n",
       "    'address': '博学路19号',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD592BJ',\n",
       "    'name': '广州南方学院综合楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '392.731',\n",
       "    'location': '113.680117,23.631544',\n",
       "    'address': '温泉大道886号广州南方学院内',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKP81F0',\n",
       "    'name': '教学楼1号(文学与传媒学院)',\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所',\n",
       "    'tel': [],\n",
       "    'direction': '西北',\n",
       "    'distance': '393.93',\n",
       "    'location': '113.676866,23.631736',\n",
       "    'address': '博学路19号附近',\n",
       "    'poiweight': '0.191742',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFLBEOND',\n",
       "    'name': '聚贤楼10号',\n",
       "    'type': '商务住宅;住宅区;宿舍',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '418.51',\n",
       "    'location': '113.681253,23.631036',\n",
       "    'address': '从莞深高速(广州南方学院)',\n",
       "    'poiweight': '0.190963',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFH6K3U9',\n",
       "    'name': '广州中大南方招待所',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': '020-61787222',\n",
       "    'direction': '西北',\n",
       "    'distance': '378.102',\n",
       "    'location': '113.676330,23.631332',\n",
       "    'address': '温泉镇温泉大道882号广州南方学院H7栋1-5层',\n",
       "    'poiweight': '0.254885',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58NF8',\n",
       "    'name': '广州南方学院达人书院',\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '446.366',\n",
       "    'location': '113.679041,23.632392',\n",
       "    'address': '温泉大道882号广州南方学院新综合楼2层',\n",
       "    'poiweight': '0.191229',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFKUVYWV',\n",
       "    'name': '广州和风庭阿七度假别墅',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '424.35',\n",
       "    'location': '113.681736,23.630569',\n",
       "    'address': '保利桃花源',\n",
       "    'poiweight': '0.273168',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU99RM',\n",
       "    'name': '广州南方学院图书馆',\n",
       "    'type': '科教文化服务;图书馆;图书馆',\n",
       "    'tel': '020-61787368;020-61787371',\n",
       "    'direction': '北',\n",
       "    'distance': '489.331',\n",
       "    'location': '113.679177,23.632762',\n",
       "    'address': '温泉大道882号广州南方学院内',\n",
       "    'poiweight': '0.257947',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU92JC',\n",
       "    'name': '广州南方学院4号实验楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '498.883',\n",
       "    'location': '113.679963,23.632652',\n",
       "    'address': '博学路附近',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFL7C054',\n",
       "    'name': '广州U优森特酒店',\n",
       "    'type': '住宿服务;住宿服务相关;住宿服务相关',\n",
       "    'tel': '15813395296',\n",
       "    'direction': '北',\n",
       "    'distance': '464.819',\n",
       "    'location': '113.679226,23.632528',\n",
       "    'address': '温泉镇博学路882号(广州南方学院商业中心1层)',\n",
       "    'poiweight': '0.317505',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0FFG8CSEK',\n",
       "    'name': 'L5员工宿舍',\n",
       "    'type': '商务住宅;住宅区;宿舍',\n",
       "    'tel': [],\n",
       "    'direction': '东北',\n",
       "    'distance': '554.129',\n",
       "    'location': '113.682583,23.631487',\n",
       "    'address': '从莞深高速(广州南方学院)',\n",
       "    'poiweight': '0.185371',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD58FR2',\n",
       "    'name': '广州南方学院教学楼9号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '532.163',\n",
       "    'location': '113.679747,23.633032',\n",
       "    'address': '广州南方学院',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HG5Z9JNK',\n",
       "    'name': '广州南方学院教学楼7号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '544.868',\n",
       "    'location': '113.678600,23.633330',\n",
       "    'address': '博学路',\n",
       "    'poiweight': '0.221553',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGD599JM',\n",
       "    'name': '广州南方学院第11教学楼',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '556.036',\n",
       "    'location': '113.680037,23.633173',\n",
       "    'address': '温泉大道882号广州南方学院',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0GUJYPEG2',\n",
       "    'name': '怒烤烤串(从化店)',\n",
       "    'type': '餐饮服务;中餐厅;特色/地方风味餐厅',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '510.112',\n",
       "    'location': '113.677160,23.632910',\n",
       "    'address': '温泉大道882号广州南方学院内博学路6号之3',\n",
       "    'poiweight': '0.216026',\n",
       "    'businessarea': []},\n",
       "   {'id': 'B0HGDU6Z41',\n",
       "    'name': '广州南方学院教学楼6号',\n",
       "    'type': '科教文化服务;学校;学校',\n",
       "    'tel': [],\n",
       "    'direction': '北',\n",
       "    'distance': '586.331',\n",
       "    'location': '113.678424,23.633710',\n",
       "    'address': '温泉大道882',\n",
       "    'poiweight': '0.221662',\n",
       "    'businessarea': []}],\n",
       "  'roads': [{'id': '020F49F0050461206',\n",
       "    'name': '博学路',\n",
       "    'direction': '北',\n",
       "    'distance': '7.63232',\n",
       "    'location': '113.678,23.6284'},\n",
       "   {'id': '020F49F0050462229',\n",
       "    'name': '老虎形街',\n",
       "    'direction': '北',\n",
       "    'distance': '445.159',\n",
       "    'location': '113.679,23.6245'},\n",
       "   {'id': '020F49F0050462451',\n",
       "    'name': '中山路',\n",
       "    'direction': '南',\n",
       "    'distance': '708.299',\n",
       "    'location': '113.677,23.6347'}],\n",
       "  'roadinters': [{'direction': '南',\n",
       "    'distance': '708.299',\n",
       "    'location': '113.676794,23.634661',\n",
       "    'first_id': '020F49F0050461206',\n",
       "    'first_name': '博学路',\n",
       "    'second_id': '020F49F0050462451',\n",
       "    'second_name': '中山路'}],\n",
       "  'aois': [{'id': 'B00140MR9A',\n",
       "    'name': '广州南方学院',\n",
       "    'adcode': '440117',\n",
       "    'location': '113.679257,23.632577',\n",
       "    'area': '528560.656426',\n",
       "    'distance': '0',\n",
       "    'type': '141201'}]}}"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "a006b28f",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "c42b9a05",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "      <th>3</th>\n",
       "      <th>4</th>\n",
       "      <th>5</th>\n",
       "      <th>6</th>\n",
       "      <th>7</th>\n",
       "      <th>8</th>\n",
       "      <th>9</th>\n",
       "      <th>...</th>\n",
       "      <th>20</th>\n",
       "      <th>21</th>\n",
       "      <th>22</th>\n",
       "      <th>23</th>\n",
       "      <th>24</th>\n",
       "      <th>25</th>\n",
       "      <th>26</th>\n",
       "      <th>27</th>\n",
       "      <th>28</th>\n",
       "      <th>29</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>id</th>\n",
       "      <td>B00140MR9A</td>\n",
       "      <td>B0FFG4TAF2</td>\n",
       "      <td>B0H6FA18J5</td>\n",
       "      <td>B00140TWHT</td>\n",
       "      <td>B0FFHRJDM9</td>\n",
       "      <td>B0HGD588HJ</td>\n",
       "      <td>B0FFHZH0IK</td>\n",
       "      <td>B0HGDU76L2</td>\n",
       "      <td>B0FFKP838K</td>\n",
       "      <td>B0FFKSF1FI</td>\n",
       "      <td>...</td>\n",
       "      <td>B0FFKUVYWV</td>\n",
       "      <td>B0HGDU99RM</td>\n",
       "      <td>B0HGDU92JC</td>\n",
       "      <td>B0FFL7C054</td>\n",
       "      <td>B0FFG8CSEK</td>\n",
       "      <td>B0HGD58FR2</td>\n",
       "      <td>B0HG5Z9JNK</td>\n",
       "      <td>B0HGD599JM</td>\n",
       "      <td>B0GUJYPEG2</td>\n",
       "      <td>B0HGDU6Z41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <td>广州南方学院</td>\n",
       "      <td>广州南方公寓</td>\n",
       "      <td>保利半山花园</td>\n",
       "      <td>教工住宅1号</td>\n",
       "      <td>中南公寓</td>\n",
       "      <td>广州南方学院教学楼4号</td>\n",
       "      <td>地下铁</td>\n",
       "      <td>广州南方学院2号实验楼</td>\n",
       "      <td>教学楼3号(外国语学院)</td>\n",
       "      <td>香辣螺蛳粉</td>\n",
       "      <td>...</td>\n",
       "      <td>广州和风庭阿七度假别墅</td>\n",
       "      <td>广州南方学院图书馆</td>\n",
       "      <td>广州南方学院4号实验楼</td>\n",
       "      <td>广州U优森特酒店</td>\n",
       "      <td>L5员工宿舍</td>\n",
       "      <td>广州南方学院教学楼9号</td>\n",
       "      <td>广州南方学院教学楼7号</td>\n",
       "      <td>广州南方学院第11教学楼</td>\n",
       "      <td>怒烤烤串(从化店)</td>\n",
       "      <td>广州南方学院教学楼6号</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>type</th>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>商务住宅;商务住宅相关;商务住宅相关</td>\n",
       "      <td>商务住宅;住宅区;住宅区</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>餐饮服务;冷饮店;冷饮店</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>餐饮服务;餐饮相关场所;餐饮相关</td>\n",
       "      <td>...</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "      <td>科教文化服务;图书馆;图书馆</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>住宿服务;住宿服务相关;住宿服务相关</td>\n",
       "      <td>商务住宅;住宅区;宿舍</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "      <td>餐饮服务;中餐厅;特色/地方风味餐厅</td>\n",
       "      <td>科教文化服务;学校;学校</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>tel</th>\n",
       "      <td>020-87828988;020-61787331</td>\n",
       "      <td>13622768437</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>13711245345</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>17820061022</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>020-61787368;020-61787371</td>\n",
       "      <td>[]</td>\n",
       "      <td>15813395296</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>direction</th>\n",
       "      <td>北</td>\n",
       "      <td>东南</td>\n",
       "      <td>东南</td>\n",
       "      <td>北</td>\n",
       "      <td>东南</td>\n",
       "      <td>北</td>\n",
       "      <td>西北</td>\n",
       "      <td>北</td>\n",
       "      <td>北</td>\n",
       "      <td>西</td>\n",
       "      <td>...</td>\n",
       "      <td>东北</td>\n",
       "      <td>北</td>\n",
       "      <td>北</td>\n",
       "      <td>北</td>\n",
       "      <td>东北</td>\n",
       "      <td>北</td>\n",
       "      <td>北</td>\n",
       "      <td>北</td>\n",
       "      <td>北</td>\n",
       "      <td>北</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>distance</th>\n",
       "      <td>470.792</td>\n",
       "      <td>102.617</td>\n",
       "      <td>139.054</td>\n",
       "      <td>222.658</td>\n",
       "      <td>231.223</td>\n",
       "      <td>242.901</td>\n",
       "      <td>74.1376</td>\n",
       "      <td>280.003</td>\n",
       "      <td>298.093</td>\n",
       "      <td>209.206</td>\n",
       "      <td>...</td>\n",
       "      <td>424.35</td>\n",
       "      <td>489.331</td>\n",
       "      <td>498.883</td>\n",
       "      <td>464.819</td>\n",
       "      <td>554.129</td>\n",
       "      <td>532.163</td>\n",
       "      <td>544.868</td>\n",
       "      <td>556.036</td>\n",
       "      <td>510.112</td>\n",
       "      <td>586.331</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>location</th>\n",
       "      <td>113.679257,23.632577</td>\n",
       "      <td>113.678983,23.627778</td>\n",
       "      <td>113.679358,23.627672</td>\n",
       "      <td>113.678490,23.630432</td>\n",
       "      <td>113.680340,23.627566</td>\n",
       "      <td>113.677460,23.630490</td>\n",
       "      <td>113.677941,23.629029</td>\n",
       "      <td>113.678211,23.630956</td>\n",
       "      <td>113.677247,23.630947</td>\n",
       "      <td>113.676231,23.628565</td>\n",
       "      <td>...</td>\n",
       "      <td>113.681736,23.630569</td>\n",
       "      <td>113.679177,23.632762</td>\n",
       "      <td>113.679963,23.632652</td>\n",
       "      <td>113.679226,23.632528</td>\n",
       "      <td>113.682583,23.631487</td>\n",
       "      <td>113.679747,23.633032</td>\n",
       "      <td>113.678600,23.633330</td>\n",
       "      <td>113.680037,23.633173</td>\n",
       "      <td>113.677160,23.632910</td>\n",
       "      <td>113.678424,23.633710</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>address</th>\n",
       "      <td>温泉大道882号</td>\n",
       "      <td>温泉镇乌土村松浪队5号(近博学路)</td>\n",
       "      <td>从莞深高速(广州南方学院南侧)</td>\n",
       "      <td>笃行路2</td>\n",
       "      <td>中大南方学院南门1号</td>\n",
       "      <td>博学路</td>\n",
       "      <td>博学路广州南方学院综合楼内</td>\n",
       "      <td>博学路</td>\n",
       "      <td>博学路25</td>\n",
       "      <td>广州南方学院西4123</td>\n",
       "      <td>...</td>\n",
       "      <td>保利桃花源</td>\n",
       "      <td>温泉大道882号广州南方学院内</td>\n",
       "      <td>博学路附近</td>\n",
       "      <td>温泉镇博学路882号(广州南方学院商业中心1层)</td>\n",
       "      <td>从莞深高速(广州南方学院)</td>\n",
       "      <td>广州南方学院</td>\n",
       "      <td>博学路</td>\n",
       "      <td>温泉大道882号广州南方学院</td>\n",
       "      <td>温泉大道882号广州南方学院内博学路6号之3</td>\n",
       "      <td>温泉大道882</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>poiweight</th>\n",
       "      <td>0.450402</td>\n",
       "      <td>0.237309</td>\n",
       "      <td>0.223065</td>\n",
       "      <td>0.157653</td>\n",
       "      <td>0.256152</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>0.17934</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>0.191742</td>\n",
       "      <td>0.209252</td>\n",
       "      <td>...</td>\n",
       "      <td>0.273168</td>\n",
       "      <td>0.257947</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>0.317505</td>\n",
       "      <td>0.185371</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>0.221553</td>\n",
       "      <td>0.221662</td>\n",
       "      <td>0.216026</td>\n",
       "      <td>0.221662</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>businessarea</th>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10 rows × 30 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                     0                     1   \\\n",
       "id                           B00140MR9A            B0FFG4TAF2   \n",
       "name                             广州南方学院                广州南方公寓   \n",
       "type                     科教文化服务;学校;高等院校    商务住宅;商务住宅相关;商务住宅相关   \n",
       "tel           020-87828988;020-61787331           13622768437   \n",
       "direction                             北                    东南   \n",
       "distance                        470.792               102.617   \n",
       "location           113.679257,23.632577  113.678983,23.627778   \n",
       "address                        温泉大道882号     温泉镇乌土村松浪队5号(近博学路)   \n",
       "poiweight                      0.450402              0.237309   \n",
       "businessarea                         []                    []   \n",
       "\n",
       "                                2                     3   \\\n",
       "id                      B0H6FA18J5            B00140TWHT   \n",
       "name                        保利半山花园                教工住宅1号   \n",
       "type                  商务住宅;住宅区;住宅区         商务住宅;住宅区;住宅小区   \n",
       "tel                             []                    []   \n",
       "direction                       东南                     北   \n",
       "distance                   139.054               222.658   \n",
       "location      113.679358,23.627672  113.678490,23.630432   \n",
       "address            从莞深高速(广州南方学院南侧)                  笃行路2   \n",
       "poiweight                 0.223065              0.157653   \n",
       "businessarea                    []                    []   \n",
       "\n",
       "                                4                     5   \\\n",
       "id                      B0FFHRJDM9            B0HGD588HJ   \n",
       "name                          中南公寓           广州南方学院教学楼4号   \n",
       "type                 商务住宅;住宅区;住宅小区          科教文化服务;学校;学校   \n",
       "tel                    13711245345                    []   \n",
       "direction                       东南                     北   \n",
       "distance                   231.223               242.901   \n",
       "location      113.680340,23.627566  113.677460,23.630490   \n",
       "address                 中大南方学院南门1号                   博学路   \n",
       "poiweight                 0.256152              0.221662   \n",
       "businessarea                    []                    []   \n",
       "\n",
       "                                6                     7   \\\n",
       "id                      B0FFHZH0IK            B0HGDU76L2   \n",
       "name                           地下铁           广州南方学院2号实验楼   \n",
       "type                  餐饮服务;冷饮店;冷饮店          科教文化服务;学校;学校   \n",
       "tel                             []                    []   \n",
       "direction                       西北                     北   \n",
       "distance                   74.1376               280.003   \n",
       "location      113.677941,23.629029  113.678211,23.630956   \n",
       "address              博学路广州南方学院综合楼内                   博学路   \n",
       "poiweight                  0.17934              0.221662   \n",
       "businessarea                    []                    []   \n",
       "\n",
       "                                8                     9   ...  \\\n",
       "id                      B0FFKP838K            B0FFKSF1FI  ...   \n",
       "name                  教学楼3号(外国语学院)                 香辣螺蛳粉  ...   \n",
       "type                科教文化服务;学校;高等院校      餐饮服务;餐饮相关场所;餐饮相关  ...   \n",
       "tel                             []           17820061022  ...   \n",
       "direction                        北                     西  ...   \n",
       "distance                   298.093               209.206  ...   \n",
       "location      113.677247,23.630947  113.676231,23.628565  ...   \n",
       "address                      博学路25           广州南方学院西4123  ...   \n",
       "poiweight                 0.191742              0.209252  ...   \n",
       "businessarea                    []                    []  ...   \n",
       "\n",
       "                                20                         21  \\\n",
       "id                      B0FFKUVYWV                 B0HGDU99RM   \n",
       "name                   广州和风庭阿七度假别墅                  广州南方学院图书馆   \n",
       "type            住宿服务;住宿服务相关;住宿服务相关             科教文化服务;图书馆;图书馆   \n",
       "tel                             []  020-61787368;020-61787371   \n",
       "direction                       东北                          北   \n",
       "distance                    424.35                    489.331   \n",
       "location      113.681736,23.630569       113.679177,23.632762   \n",
       "address                      保利桃花源            温泉大道882号广州南方学院内   \n",
       "poiweight                 0.273168                   0.257947   \n",
       "businessarea                    []                         []   \n",
       "\n",
       "                                22                        23  \\\n",
       "id                      B0HGDU92JC                B0FFL7C054   \n",
       "name                   广州南方学院4号实验楼                  广州U优森特酒店   \n",
       "type                  科教文化服务;学校;学校        住宿服务;住宿服务相关;住宿服务相关   \n",
       "tel                             []               15813395296   \n",
       "direction                        北                         北   \n",
       "distance                   498.883                   464.819   \n",
       "location      113.679963,23.632652      113.679226,23.632528   \n",
       "address                      博学路附近  温泉镇博学路882号(广州南方学院商业中心1层)   \n",
       "poiweight                 0.221662                  0.317505   \n",
       "businessarea                    []                        []   \n",
       "\n",
       "                                24                    25  \\\n",
       "id                      B0FFG8CSEK            B0HGD58FR2   \n",
       "name                        L5员工宿舍           广州南方学院教学楼9号   \n",
       "type                   商务住宅;住宅区;宿舍          科教文化服务;学校;学校   \n",
       "tel                             []                    []   \n",
       "direction                       东北                     北   \n",
       "distance                   554.129               532.163   \n",
       "location      113.682583,23.631487  113.679747,23.633032   \n",
       "address              从莞深高速(广州南方学院)                广州南方学院   \n",
       "poiweight                 0.185371              0.221662   \n",
       "businessarea                    []                    []   \n",
       "\n",
       "                                26                    27  \\\n",
       "id                      B0HG5Z9JNK            B0HGD599JM   \n",
       "name                   广州南方学院教学楼7号          广州南方学院第11教学楼   \n",
       "type                  科教文化服务;学校;学校          科教文化服务;学校;学校   \n",
       "tel                             []                    []   \n",
       "direction                        北                     北   \n",
       "distance                   544.868               556.036   \n",
       "location      113.678600,23.633330  113.680037,23.633173   \n",
       "address                        博学路        温泉大道882号广州南方学院   \n",
       "poiweight                 0.221553              0.221662   \n",
       "businessarea                    []                    []   \n",
       "\n",
       "                                  28                    29  \n",
       "id                        B0GUJYPEG2            B0HGDU6Z41  \n",
       "name                       怒烤烤串(从化店)           广州南方学院教学楼6号  \n",
       "type              餐饮服务;中餐厅;特色/地方风味餐厅          科教文化服务;学校;学校  \n",
       "tel                               []                    []  \n",
       "direction                          北                     北  \n",
       "distance                     510.112               586.331  \n",
       "location        113.677160,23.632910  113.678424,23.633710  \n",
       "address       温泉大道882号广州南方学院内博学路6号之3               温泉大道882  \n",
       "poiweight                   0.216026              0.221662  \n",
       "businessarea                      []                    []  \n",
       "\n",
       "[10 rows x 30 columns]"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['regeocode']['pois']).T"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0495324e",
   "metadata": {},
   "source": [
    "## POI搜索  \n",
    "> 搜索服务API是一类简单的HTTP接口，提供多种查询POI信息的能力，其中包括关键字搜索、周边搜索、多边形搜索、ID查询四种筛选机制。\n",
    "* 关键字搜索：通过用POI的关键字进行条件搜索，例如：肯德基、朝阳公园等；同时支持设置POI类型搜索，例如：银行\n",
    "* 周边搜索：在用户传入经纬度坐标点附近，在设定的范围内，按照关键字或POI类型搜索；\n",
    "* 多边形搜索：在多边形区域内进行搜索\n",
    "* ID查询：通过POI ID，查询某个POI详情，建议可同输入提示API配合使用"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "641b7089",
   "metadata": {},
   "source": [
    "### 关键字搜索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "735555b0",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "9150b173",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>参数名</th>\n",
       "      <th>参数名.1</th>\n",
       "      <th>含义</th>\n",
       "      <th>规则说明</th>\n",
       "      <th>是否必须</th>\n",
       "      <th>缺省值</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>key</td>\n",
       "      <td>key</td>\n",
       "      <td>请求服务权限标识</td>\n",
       "      <td>用户在高德地图官网申请Web服务API类型KEY</td>\n",
       "      <td>必填</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>keywords</td>\n",
       "      <td>keywords</td>\n",
       "      <td>查询关键字</td>\n",
       "      <td>规则： 多个关键字用“|”分割若不指定city，并且搜索的为泛词（例如“美食”）的情况下，返...</td>\n",
       "      <td>必填(keywords和types两者至少必选其一)</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>types</td>\n",
       "      <td>types</td>\n",
       "      <td>查询POI类型</td>\n",
       "      <td>可选值：分类代码 或 汉字（若用汉字，请严格按照附件之中的汉字填写）分类代码由六位数字组成，...</td>\n",
       "      <td>必填(keywords和types两者至少必选其一)</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>city</td>\n",
       "      <td>city</td>\n",
       "      <td>查询城市</td>\n",
       "      <td>可选值：城市中文、中文全拼、citycode、adcode如：北京/beijing/010/...</td>\n",
       "      <td>可选</td>\n",
       "      <td>无（全国范围内搜索）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>citylimit</td>\n",
       "      <td>citylimit</td>\n",
       "      <td>仅返回指定城市数据</td>\n",
       "      <td>可选值：true/false</td>\n",
       "      <td>可选</td>\n",
       "      <td>false</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>children</td>\n",
       "      <td>children</td>\n",
       "      <td>是否按照层级展示子POI数据</td>\n",
       "      <td>可选值：children=1当为0的时候，子POI都会显示。当为1的时候，子POI会归类到父...</td>\n",
       "      <td>可选</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>offset</td>\n",
       "      <td>offset</td>\n",
       "      <td>每页记录数据</td>\n",
       "      <td>强烈建议不超过25，若超过25可能造成访问报错</td>\n",
       "      <td>可选</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>page</td>\n",
       "      <td>page</td>\n",
       "      <td>当前页数</td>\n",
       "      <td>最大翻页数100</td>\n",
       "      <td>可选</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>extensions</td>\n",
       "      <td>extensions</td>\n",
       "      <td>返回结果控制</td>\n",
       "      <td>此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。</td>\n",
       "      <td>可选</td>\n",
       "      <td>base</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>sig</td>\n",
       "      <td>sig</td>\n",
       "      <td>数字签名</td>\n",
       "      <td>数字签名获取和使用方法</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>output</td>\n",
       "      <td>output</td>\n",
       "      <td>返回数据格式类型</td>\n",
       "      <td>可选值：JSON，XML</td>\n",
       "      <td>可选</td>\n",
       "      <td>JSON</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>callback</td>\n",
       "      <td>callback</td>\n",
       "      <td>回调函数</td>\n",
       "      <td>callback值是用户定义的函数名称，此参数只在output=JSON时有效</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           参数名       参数名.1              含义  \\\n",
       "0          key         key        请求服务权限标识   \n",
       "1     keywords    keywords           查询关键字   \n",
       "2        types       types         查询POI类型   \n",
       "3         city        city            查询城市   \n",
       "4    citylimit   citylimit       仅返回指定城市数据   \n",
       "5     children    children  是否按照层级展示子POI数据   \n",
       "6       offset      offset          每页记录数据   \n",
       "7         page        page            当前页数   \n",
       "8   extensions  extensions          返回结果控制   \n",
       "9          sig         sig            数字签名   \n",
       "10      output      output        返回数据格式类型   \n",
       "11    callback    callback            回调函数   \n",
       "\n",
       "                                                 规则说明  \\\n",
       "0                            用户在高德地图官网申请Web服务API类型KEY   \n",
       "1   规则： 多个关键字用“|”分割若不指定city，并且搜索的为泛词（例如“美食”）的情况下，返...   \n",
       "2   可选值：分类代码 或 汉字（若用汉字，请严格按照附件之中的汉字填写）分类代码由六位数字组成，...   \n",
       "3   可选值：城市中文、中文全拼、citycode、adcode如：北京/beijing/010/...   \n",
       "4                                      可选值：true/false   \n",
       "5   可选值：children=1当为0的时候，子POI都会显示。当为1的时候，子POI会归类到父...   \n",
       "6                             强烈建议不超过25，若超过25可能造成访问报错   \n",
       "7                                            最大翻页数100   \n",
       "8        此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。   \n",
       "9                                         数字签名获取和使用方法   \n",
       "10                                       可选值：JSON，XML   \n",
       "11            callback值是用户定义的函数名称，此参数只在output=JSON时有效   \n",
       "\n",
       "                          是否必须         缺省值  \n",
       "0                           必填           无  \n",
       "1   必填(keywords和types两者至少必选其一)           无  \n",
       "2   必填(keywords和types两者至少必选其一)           无  \n",
       "3                           可选  无（全国范围内搜索）  \n",
       "4                           可选       false  \n",
       "5                           可选           0  \n",
       "6                           可选          20  \n",
       "7                           可选           1  \n",
       "8                           可选        base  \n",
       "9                           可选           无  \n",
       "10                          可选        JSON  \n",
       "11                          可选           无  "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_html(\"\"\"<div class=\"md-atomic\"><div class=\"table-container\" style=\"width:100%;\"><table class=\"md-table  \" data-meta=\"%7B%22width%22%3A%22100%25%22%7D\"><tbody><tr><th colspan=\"2\" style=\"white-space:nowrap;\"><p>参数名</p></th><th><p>含义</p></th><th><p>规则说明</p></th><th><p>是否必须</p></th><th><p>缺省值</p></th></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>key</p></td><td><p>请求服务权限标识</p></td><td><p>用户在高德地图官网<a href=\"https://lbs.amap.com/dev/\" class=\"\" target=\"_blank\">申请Web服务API类型KEY</a></p></td><td><p>必填</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>keywords</p></td><td><p>查询关键字</p></td><td><p>规则： 多个关键字用“|”分割</p><p>若不指定city，并且搜索的为泛词（例如“美食”）的情况下，返回的内容为城市列表以及此城市内有多少结果符合要求。</p></td><td><p>必填</p><p>(keywords和types两者至少必选其一)</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>types</p></td><td><p>查询POI类型</p></td><td><p>可选值：分类代码 或 汉字（若用汉字，请严格按照附件之中的汉字填写）</p><p><br></p><p>分类代码由六位数字组成，一共分为三个部分，前两个数字代表大类；中间两个数字代表中类；最后两个数字代表小类。</p><p>若指定了某个大类，则所属的中类、小类都会被显示。</p><p>例如：010000为汽车服务（大类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010100为加油站（中类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010101为中国石化（小类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010900为汽车租赁（中类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010901为汽车租赁还车（小类）</p><p>当指定010000，则010100等中类、010101等小类都会被包含，当指定010900，则010901等小类都会被包含。</p><p>下载<a href=\"https://lbs.amap.com/api/webservice/download\" class=\"\" target=\"_blank\">POI分类编码和城市编码表 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></p><p><br></p><p>若不指定city，返回的内容为城市列表以及此城市内有多少结果符合要求。&nbsp;</p><p><strong>当您的keywords和types都是空时，默认指定types为120000（商务住宅）&amp;150000（交通设施服务）</strong></p></td><td><p>必填</p><p>(keywords和types两者至少必选其一)</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>city</p></td><td><p>查询城市</p></td><td><p>可选值：城市中文、中文全拼、citycode、adcode</p><p>如：北京/beijing/010/110000</p><p>填入此参数后，会尽量优先返回此城市数据，但是不一定仅局限此城市结果，若仅需要某个城市数据请调用citylimit参数。</p><p>如：在深圳市搜天安门，返回北京天安门结果。</p></td><td><p>可选</p></td><td><p>无（全国范围内搜索）</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>citylimit</p></td><td><p>仅返回指定城市数据</p></td><td><p>可选值：true/false</p></td><td><p>可选</p></td><td><p>false</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>children</p></td><td><p>是否按照层级展示子POI数据</p></td><td><p>可选值：children=1</p><p>当为0的时候，子POI都会显示。</p><p>当为1的时候，子POI会归类到父POI之中。</p><p><br></p><p>仅在extensions=all的时候生效</p></td><td><p>可选</p></td><td><p>0</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>offset</p></td><td><p>每页记录数据</p></td><td><p>强烈建议不超过25，若超过25可能造成访问报错</p></td><td><p>可选</p></td><td><p>20</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>page</p></td><td><p>当前页数</p></td><td><p>最大翻页数100</p></td><td><p>可选</p></td><td><p>1</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>extensions</p></td><td><p>返回结果控制</p></td><td><p>此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。</p></td><td><p>可选</p></td><td><p>base</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>sig</p></td><td><p>数字签名</p></td><td><p><a href=\"https://lbs.amap.com/faq/account/key/72\" class=\"\" target=\"_blank\">数字签名获取和使用方法</a></p></td><td><p>可选</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>output</p></td><td><p>返回数据格式类型</p></td><td><p>可选值：JSON，XML</p></td><td><p>可选</p></td><td><p>JSON</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>callback</p></td><td><p>回调函数</p></td><td><p>callback值是用户定义的函数名称，此参数只在output=JSON时有效</p></td><td><p>可选</p></td><td><p>无</p></td></tr></tbody></table></div></div>\"\"\")[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "9d8a3fb2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '896',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': 'B00140UFF9',\n",
       "   'address': '东风中路268号交易广场首层112-113',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '23.00',\n",
       "    'opentime2': '周一至周五10:00-21:00,周六至周日10:00-22:00',\n",
       "    'rating': '4.3',\n",
       "    'open_time': '10:00-21:00 10:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2ad6fd1bec5a14a3c1f6f9a3527c5c33'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0a1775684dccc42baa063a7ae8b75390'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/fa95c3158050fe57157a311bfb9bfd9e'}],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '越秀区',\n",
       "   'name': '赛百味(交易广场店)',\n",
       "   'location': '113.263146,23.131008',\n",
       "   'tel': '020-83320471',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140T179'},\n",
       "  {'parent': [],\n",
       "   'address': '越华路116号雅兰酒店旁(区政府对面)',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '75.00',\n",
       "    'opentime2': '10:00-21:30',\n",
       "    'rating': '4.5',\n",
       "    'open_time': '10:00-21:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;火锅店',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/eaafd2d27154b46329d7d2ca5d7d5152'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0c07d3de925fe6c258efc2f8f620974a'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/138176bebcff253d5dc959e541aaa094'}],\n",
       "   'typecode': '050117',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '越秀区',\n",
       "   'name': '牛一方潮汕牛肉(越华路店)',\n",
       "   'location': '113.266641,23.129317',\n",
       "   'tel': '020-83137330',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHUOWI8'},\n",
       "  {'parent': 'B00140U1YX',\n",
       "   'address': '越华路112号珠江国际大厦4层',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '290.00',\n",
       "    'opentime2': '11:00-23:00',\n",
       "    'rating': '4.7',\n",
       "    'open_time': '11:00-23:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;综合酒楼',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/51fecd5e3c116b1226d5a6690cf2f705'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/16160e98c1da90ef02b2a49217928747'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/bc3054ee26e63378fa649f0ef34ddc51'}],\n",
       "   'typecode': '050101',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '越秀区',\n",
       "   'name': '龙庭琇厨(越华店)',\n",
       "   'location': '113.267539,23.129697',\n",
       "   'tel': '020-83033988;15875071112',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141T32F'},\n",
       "  {'parent': [],\n",
       "   'address': '东风中路331号德源里1号',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '40.00',\n",
       "    'opentime2': '10:00-21:30',\n",
       "    'rating': '4.8',\n",
       "    'open_time': '10:00-21:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0c091432ab387ccc89083a0078166596'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/178f80742a3ade9971fccdeed4c4b7e8'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/55acb625a310a084c90f0704'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '越秀区',\n",
       "   'name': '胜安饭店',\n",
       "   'location': '113.269168,23.131421',\n",
       "   'tel': '020-83557870;15812496558',\n",
       "   'shopid': [],\n",
       "   'id': 'B0014021E7'},\n",
       "  {'parent': 'B0FFF0JR5W',\n",
       "   'address': '中山五路70号捷登都会5层L5001室',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '90.00',\n",
       "    'opentime2': '10:00-22:00',\n",
       "    'rating': '4.4',\n",
       "    'open_time': '10:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;云贵菜',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/598e336f3508eaa120a3b3fd72fe2080'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/00ecaeadf9e9db67b07e93e5d70d0f75'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0339f042e9afb157722190f67cac0c92'}],\n",
       "   'typecode': '050114',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '越秀区',\n",
       "   'name': '甘思咪哚云南艺术餐厅(越秀店)',\n",
       "   'location': '113.265922,23.125913',\n",
       "   'tel': '020-83700336',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGIQZF4'},\n",
       "  {'parent': [],\n",
       "   'address': '吉祥路1号广州动漫星城广场负一层W1A007铺',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '24.00',\n",
       "    'opentime2': '10:00-21:00',\n",
       "    'rating': '4.3',\n",
       "    'open_time': '10:00-21:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2ad6fd1bec5a14a3c1f6f9a3527c5c33'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/72ecfbf978290669fd68d51c2ab68ffa'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/892a392890f72fdd23535cf6be3932f7'}],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '越秀区',\n",
       "   'name': '赛百味(动漫星城店)',\n",
       "   'location': '113.264985,23.125752',\n",
       "   'tel': '020-62681206;13560076070',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140UEQJ'},\n",
       "  {'parent': [],\n",
       "   'address': '百灵路86号(近市一医院)',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '15.00',\n",
       "    'opentime2': '06:30-23:00',\n",
       "    'rating': '4.7',\n",
       "    'open_time': '06:30-23:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5de91a56b01dc1e6018a98dd1fa99bcf'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/dc80866e3a36f88105f32c26c4df1ccd'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1dafcd9dcaf41403cea1b84956e7cbd0'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '越秀区',\n",
       "   'name': '银记肠粉店(百灵店)',\n",
       "   'location': '113.260005,23.130781',\n",
       "   'tel': '020-83772441;13352880128;020-83510648',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140ASNP'},\n",
       "  {'parent': 'B0FFF0JR5W',\n",
       "   'address': '中山五路与吉祥路交汇处捷登都会4层(公元前站F站出口)',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '67.00',\n",
       "    'opentime2': '周一至周五10:00-21:30,周六至周日11:00-21:30',\n",
       "    'rating': '4.5',\n",
       "    'open_time': '10:00-21:30 11:00-21:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;外国餐厅;泰国/越南菜品餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2645707ecac8526b16f95efe3154c84f'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1764fe287f760d5171b49eb2e4109ad9'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1c51c71bf756ddc2a6b8517da5cc907c'}],\n",
       "   'typecode': '050206',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '越秀区',\n",
       "   'name': '新越盏(公园前捷登店)',\n",
       "   'location': '113.265748,23.125749',\n",
       "   'tel': '020-83524138',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGE0EIS'},\n",
       "  {'parent': 'B001401F36',\n",
       "   'address': '六榕路143号105铺',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '15.00',\n",
       "    'opentime2': '06:30-15:30',\n",
       "    'rating': '4.2',\n",
       "    'open_time': '06:30-15:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f03e654687474389195afcae27f16f56'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/569e3c936d6380af4a77d38cbf5d39c4'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/099fc3a043f89c86cf74554ba171b4db'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '3',\n",
       "   'adname': '越秀区',\n",
       "   'name': '味然香(六榕店)',\n",
       "   'location': '113.260445,23.130533',\n",
       "   'tel': '020-83362292',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140BQ75'},\n",
       "  {'parent': 'B0FFGFVZFB',\n",
       "   'address': '广大路24号首层',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '22.00',\n",
       "    'opentime2': '07:30-21:00',\n",
       "    'rating': '4.8',\n",
       "    'open_time': '07:30-21:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cf45db79cd452a65d310b2fd2bd03e4d'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0e266f80bede1e44d29f2e44bcdeeecf'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/00749fa1b3c59e022a823d475284052c'}],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '324',\n",
       "   'adname': '越秀区',\n",
       "   'name': '都城快餐(广大路店)',\n",
       "   'location': '113.267729,23.126348',\n",
       "   'tel': '020-83336050;020-83341302',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141RHE0'},\n",
       "  {'parent': 'B0FFF0JR5W',\n",
       "   'address': '中山五路70号捷登都会大厦四层4013单元',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '86.00',\n",
       "    'opentime2': '11:00-22:00',\n",
       "    'rating': '4.6',\n",
       "    'open_time': '11:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;外国餐厅;日本料理',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/abea4387f668f61e6c5f05ca0af0120e'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/01b5215c822bfa2ea148119e48a60428'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0feb3f8542a871d57e277305ab737be3'}],\n",
       "   'typecode': '050202',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '越秀区',\n",
       "   'name': '元气寿司(捷登广场店)',\n",
       "   'location': '113.266034,23.125642',\n",
       "   'tel': '020-37757856',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGYU9KQ'},\n",
       "  {'parent': 'B0FFGFVZFB',\n",
       "   'address': '广大路24号2楼(近五月花)',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '37.00',\n",
       "    'opentime2': '11:30-14:00；17:30-20:40',\n",
       "    'rating': '4.5',\n",
       "    'open_time': '11:30-14:00 17:30-20:40',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2053bf373a65daf93cf5871e2a01c301'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ba052f416a6be7d4379deddaf7738b59'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3d66b74357824d7e7beab89f39b5b820'}],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '324',\n",
       "   'adname': '越秀区',\n",
       "   'name': '芝仕堡意粉餐厅(广大路店)',\n",
       "   'location': '113.267695,23.126481',\n",
       "   'tel': '020-83185082',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141P1JW'},\n",
       "  {'parent': 'B00140AG0N',\n",
       "   'address': '中山五路68号五月花商业广场4楼',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '87.00',\n",
       "    'opentime2': '全年11:00-14:00；17:00-22:00',\n",
       "    'rating': '4.4',\n",
       "    'open_time': '11:00-14:00 17:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;外国餐厅;法式菜品餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/48a031fc27a6bb9b4c4499c1c0224dd8'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/04b56f9e802e269f0f995d7edea395db'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/06609b5c28e9bca5fbc246b579edb8bc'}],\n",
       "   'typecode': '050204',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '201',\n",
       "   'adname': '越秀区',\n",
       "   'name': '1928音乐餐厅(五月花商业广场店)',\n",
       "   'location': '113.266728,23.125756',\n",
       "   'tel': '020-83333810',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF0FKTH'},\n",
       "  {'parent': [],\n",
       "   'address': '应元路78-80号富宏花园1-3层(原同甘同味)',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '78.00',\n",
       "    'opentime2': '09:00-22:00',\n",
       "    'rating': '4.8',\n",
       "    'open_time': '09:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;综合酒楼',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/72cf66b083f2098690951b1834f60876'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0c8dc05a48feaef9f85febd2785850be'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0fb9a8f188112d2dbc6c7c838886fa6e'}],\n",
       "   'typecode': '050101',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '越秀区',\n",
       "   'name': '竹溪酒家(应元店)',\n",
       "   'location': '113.269340,23.134840',\n",
       "   'tel': '020-83566222;020-83566000',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFH6WDVR'},\n",
       "  {'parent': 'B00141UF3F',\n",
       "   'address': '盘福路22号泰峰大厦1层',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '51.00',\n",
       "    'opentime2': '07:30-16:00；17:00-21:00',\n",
       "    'rating': '4.8',\n",
       "    'open_time': '07:30-16:00 17:00-21:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;广东菜(粤菜)',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9d8bbedc45b22e790160b7a32dffbb2f'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2c99a7272db25afdd42b181300924112'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/02f18fdb4820014b54cb6de9569ddc44'}],\n",
       "   'typecode': '050103',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '越秀区',\n",
       "   'name': '点都德(盘福楼店)',\n",
       "   'location': '113.259608,23.133921',\n",
       "   'tel': '020-83064428',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFH86PEO'},\n",
       "  {'parent': 'B00140UFEV',\n",
       "   'address': '公园前吉祥路1号广州动漫星城广场西区b1层',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '37.00',\n",
       "    'opentime2': [],\n",
       "    'rating': '4.3',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;大快活',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e19342f034ad796f2366ee6df58d259a'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/069b8a6820acad7f9e83cc5036591aea'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/138f20ac8e01bf3403bcd83e3cd49dd7'}],\n",
       "   'typecode': '050307',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '302',\n",
       "   'adname': '越秀区',\n",
       "   'name': '大快活(动漫星城店)',\n",
       "   'location': '113.264995,23.125791',\n",
       "   'tel': '020-83335557;020-83338821',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140T9UB'},\n",
       "  {'parent': [],\n",
       "   'address': '百灵路89号(近知用中学)',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '21.00',\n",
       "    'opentime2': '07:00-16:30；17:00-21:30',\n",
       "    'rating': '4.2',\n",
       "    'open_time': '07:00-16:30 17:00-21:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;快餐厅;茶餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/31c774192b911d5afe2ed340adedd062'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/024c596c59fdf05017ff493dc5421c95'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/532335918c81c1f3b75342d538b65fc5'}],\n",
       "   'typecode': '050305',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '越秀区',\n",
       "   'name': '绿竹茶餐厅',\n",
       "   'location': '113.259629,23.130580',\n",
       "   'tel': '020-83319115;13822132031',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140JS5Q'},\n",
       "  {'parent': 'B0FFKRQH9L',\n",
       "   'address': '中山四路395号5楼501-503、505号',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '110.00',\n",
       "    'opentime2': '09:00-07:00',\n",
       "    'rating': '4.8',\n",
       "    'open_time': '09:00-07:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;火锅店',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/343b260bbb511d1ec007e63cd854dde8'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/360d1177ab877e73cd8577df9acff082'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3f9e62ce043562d1e200e55cae3ded93'}],\n",
       "   'typecode': '050117',\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '越秀区',\n",
       "   'name': '海底捞火锅(北京路店)',\n",
       "   'location': '113.269372,23.125498',\n",
       "   'tel': '020-83027255',\n",
       "   'shopid': [],\n",
       "   'id': 'B00141VVZW'},\n",
       "  {'parent': 'B00140T169',\n",
       "   'address': '北京路374号广州大厦3楼',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '70.00',\n",
       "    'opentime2': '07:30-21:30',\n",
       "    'rating': '4.0',\n",
       "    'open_time': '07:30-21:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;外国餐厅;西餐厅(综合风味)',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c0cd86e3c8357991a15958a836f64176'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/455b7cfb4b33f784087b3833ad8e6b6b'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/ab521281474a735997a6260380c4d5aa'}],\n",
       "   'typecode': '050201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '越秀区',\n",
       "   'name': '聚谊阁西餐厅',\n",
       "   'location': '113.269414,23.128872',\n",
       "   'tel': '18925096940;020-83189888',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFZD6YX'},\n",
       "  {'parent': [],\n",
       "   'address': '解放北路412号(21路公交总站旁)',\n",
       "   'distance': [],\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '12.00',\n",
       "    'opentime2': '00:00-24:00',\n",
       "    'rating': '4.6',\n",
       "    'open_time': '24小时营业',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '广州市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4015316bb6c70ce69a4059aba70f5441'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/7893e8ff793570f1a56a50a0eef80bec'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2b8a842fbbf60a2c16c1b842ea15de60'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '越秀区',\n",
       "   'name': '天龙居美食(解放北路店)',\n",
       "   'location': '113.262262,23.132451',\n",
       "   'tel': '13710656472;020-83560986',\n",
       "   'shopid': [],\n",
       "   'id': 'B00140SFPV'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： https://restapi.amap.com/v3/place/text?parameters\n",
    "text_url = \"https://restapi.amap.com/v3/place/text?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"keywords\":\"美食\",\n",
    "    \"types\":\"餐饮服务\",\n",
    "    \"city\":\"广州\"\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=text_url, params=payload) \n",
    "r\n",
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "5e22abcf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '864',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '30.00', 'rating': '4.9', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;风景名胜',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d1d04e165565c636cf67fb732e407270'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/0633b35b-d407-4fcb-b149-bbc1269adec1.jpg'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/541b23eed960f9f96792eea89ae3edf6'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016106621',\n",
       "   'typecode': '110200',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '昌平区',\n",
       "   'children': [{'typecode': ' 991401 ',\n",
       "     'address': ' 阳坊镇后二路 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 南门 ',\n",
       "     'name': ' 北京后花园(白虎涧)风景区(南门) ',\n",
       "     'location': '116.097733,40.125331',\n",
       "     'id': ' B0HGJUK5F5 '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': '  ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 3号停车场 ',\n",
       "     'name': ' 北京后花园(白虎涧)风景区3号停车场 ',\n",
       "     'location': '116.098533,40.125691',\n",
       "     'id': ' B0H2O5E7J1 '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': '  ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 2号停车场 ',\n",
       "     'name': ' 北京后花园(白虎涧)风景区2号停车场 ',\n",
       "     'location': '116.105951,40.123693',\n",
       "     'id': ' B0H2O5CXZI '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 后二路(北京后花园) ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 1号停车场 ',\n",
       "     'name': ' 北京后花园(白虎涧)风景区1号停车场 ',\n",
       "     'location': '116.098472,40.124334',\n",
       "     'id': ' B0FFHQ7TBQ '}],\n",
       "   'alias': '白虎涧森林公园',\n",
       "   'tel': '010-69768087;010-60707588;010-69768979',\n",
       "   'id': 'B000A08863',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.097989,40.12523',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 19:07:16',\n",
       "   'website': [],\n",
       "   'address': '阳坊镇',\n",
       "   'adcode': '110114',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '北京后花园(白虎涧)风景区',\n",
       "   'location': '116.081952,40.14064',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F047017_6',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '15.00', 'rating': '4.9', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;风景名胜',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/77371f5104edc4f1ea468a590517654d'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/db20d93e1ec7be5a8b75a781fd27b06f'},\n",
       "    {'provider': [],\n",
       "     'title': '虎峪自然风景区',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b13b60c02b738ce7f174dd6b8dfc3bd3'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016309801',\n",
       "   'typecode': '110200',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '昌平区',\n",
       "   'children': [{'typecode': ' 991401 ',\n",
       "     'address': ' 南口镇虎峪村北虎峪自然风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 南门 ',\n",
       "     'name': ' 虎峪自然风景区(南门) ',\n",
       "     'location': '116.150263,40.270864',\n",
       "     'id': ' B0FFG7ORQG '},\n",
       "    {'typecode': ' 070306 ',\n",
       "     'address': ' 虎峪风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '售票处',\n",
       "     'sname': ' 售票处 ',\n",
       "     'name': ' 虎峪自然风景区售票处 ',\n",
       "     'location': '116.150206,40.270947',\n",
       "     'id': ' B000A7ZL66 '},\n",
       "    {'typecode': ' 070201 ',\n",
       "     'address': ' 南口镇虎峪村北 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': [],\n",
       "     'sname': ' 游客中心 ',\n",
       "     'name': ' 虎峪自然风景区游客中心 ',\n",
       "     'location': '116.149077,40.272117',\n",
       "     'id': ' B0HBBR6151 '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 南口镇虎峪村北虎峪自然风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 停车场 ',\n",
       "     'name': ' 虎峪自然风景区停车场 ',\n",
       "     'location': '116.148541,40.271964',\n",
       "     'id': ' B000A80SHD '}],\n",
       "   'alias': [],\n",
       "   'tel': '010-69770295;010-69771720',\n",
       "   'id': 'B000A08853',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.148812,40.271648',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 18:16:22',\n",
       "   'website': 'www.bjhuyu.com.cn',\n",
       "   'address': '南口镇虎峪村北',\n",
       "   'adcode': '110114',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': '102201',\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '虎峪自然风景区',\n",
       "   'location': '116.106782,40.325195',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F045017_4',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '4.0', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜相关;旅游景点',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916620820',\n",
       "   'typecode': '110000',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '丰台区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0G3A5E2JP',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.352192,39.841557',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-03-31 15:33:21',\n",
       "   'website': [],\n",
       "   'address': '草桥西路草桥欣园-四区',\n",
       "   'adcode': '110106',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '草桥',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '丰台区草桥风景',\n",
       "   'location': '116.351357,39.841182',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '交通设施服务;停车场;停车场相关',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916614902',\n",
       "   'typecode': '150900',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '丰台区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0HU9D6S8D',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.249579,39.867613',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 05:07:25',\n",
       "   'website': [],\n",
       "   'address': '大瓦窑北路2号院(假日风景C区)',\n",
       "   'adcode': '110106',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '假日风景C区停车场',\n",
       "   'location': '116.249582,39.867657',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '20.00', 'rating': '4.8', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;风景名胜',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': '神堂峪风景区',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/175f3ca48955a0001add81e012900f90'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a080c9525df792d46dec35e0f1ca991b'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a989410920a24b74125fd1b97697c8ba'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016542920',\n",
       "   'typecode': '110200',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '怀柔区',\n",
       "   'children': [{'typecode': ' 991401 ',\n",
       "     'address': ' 石片村1号 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 东门 ',\n",
       "     'name': ' 神堂峪自然风景区(东门) ',\n",
       "     'location': '116.622530,40.448776',\n",
       "     'id': ' B0FFG7O3JB '},\n",
       "    {'typecode': ' 070306 ',\n",
       "     'address': ' 石片村1号神堂峪自然风景区附近 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '售票处',\n",
       "     'sname': ' 售票处 ',\n",
       "     'name': ' 神堂峪自然风景区售票处 ',\n",
       "     'location': '116.622685,40.448864',\n",
       "     'id': ' B000A80SDU '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 石片村1号神堂峪风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 东门停车场 ',\n",
       "     'name': ' 神堂峪自然风景区东门停车场 ',\n",
       "     'location': '116.623019,40.448989',\n",
       "     'id': ' B0FFFYJTPL '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 石片村1号神堂峪自然风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 神堂峪道停车场 ',\n",
       "     'name': ' 停车场 ',\n",
       "     'location': '116.624781,40.447729',\n",
       "     'id': ' B0FFFADFL2 '}],\n",
       "   'alias': '神堂峪风景区',\n",
       "   'tel': '010-89617644;010-89617093;010-89617707',\n",
       "   'id': 'B000A0886B',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.622793,40.448907',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 02:51:46',\n",
       "   'website': 'www.bjsty.com',\n",
       "   'address': '石片村1号',\n",
       "   'adcode': '110116',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '神堂峪自然风景区',\n",
       "   'location': '116.61177,40.438855',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F043021_4',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '60.00', 'rating': '4.8', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;国家级景点',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e27b465f957ae76f48c7cfd13b33aefb'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/009530831125932e385e3a076a1ad2f3'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4a7d513b882057945ac602781dc3cec2'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016667410',\n",
       "   'typecode': '110202',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '密云区',\n",
       "   'children': [{'typecode': ' 991400 ',\n",
       "     'address': ' 石城镇大关桥北京黑龙潭自然风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 东南门 ',\n",
       "     'name': ' 北京黑龙潭自然风景区(东南门) ',\n",
       "     'location': '116.801368,40.563279',\n",
       "     'id': ' B000A8W0KX '},\n",
       "    {'typecode': ' 070306 ',\n",
       "     'address': ' 琉辛路北京黑龙潭自然风景区附近 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '售票处',\n",
       "     'sname': ' 售票处 ',\n",
       "     'name': ' 北京黑龙潭自然风景区售票处 ',\n",
       "     'location': '116.801436,40.563344',\n",
       "     'id': ' B000A8WDKT '},\n",
       "    {'typecode': ' 070201 ',\n",
       "     'address': ' 密关路黑龙潭停车场 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': [],\n",
       "     'sname': ' 游客服务中心 ',\n",
       "     'name': ' 北京黑龙潭自然风景区游客服务中心 ',\n",
       "     'location': '116.801779,40.562803',\n",
       "     'id': ' B0FFKN6L90 '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 琉辛路附近 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 5号停车场 ',\n",
       "     'name': ' 北京黑龙潭自然风景区5号停车场(暂停营业) ',\n",
       "     'location': '116.79946,40.570938',\n",
       "     'id': ' B000ABCN3Z '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 密关路与琉辛路交叉口北100米 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 3号停车场 ',\n",
       "     'name': ' 北京黑龙潭自然风景区3号停车场(暂停营业) ',\n",
       "     'location': '116.801178,40.566483',\n",
       "     'id': ' B0FFFADOK8 '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 石城镇大关桥北京黑龙潭自然风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 2号停车场 ',\n",
       "     'name': ' 北京黑龙潭自然风景区2号停车场 ',\n",
       "     'location': '116.802149,40.5623',\n",
       "     'id': ' B000A8WDK3 '}],\n",
       "   'alias': '黑龙潭景区',\n",
       "   'tel': [],\n",
       "   'id': 'B000A0884A',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.801434,40.564055',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 18:20:52',\n",
       "   'website': 'www.bj-hlt.com',\n",
       "   'address': '石城镇大关桥',\n",
       "   'adcode': '110118',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '北京黑龙潭自然风景区',\n",
       "   'location': '116.776367,40.565101',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F042023_1',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '3.8', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜相关;旅游景点',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6017516721',\n",
       "   'typecode': '110000',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '密云区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFK5WDLT',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-18 12:34:48',\n",
       "   'website': [],\n",
       "   'address': '北庄干峪沟村',\n",
       "   'adcode': '110118',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '干峪沟风景区',\n",
       "   'location': '117.217054,40.474924',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '4.6', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;风景名胜',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/86d5a038-9092-4010-82c6-6dc61a48d301.jpg'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/07a03819-64e9-4f51-b961-9d9fd3c59786.jpg'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a62375171ebaa122db10a9b27a6c1258'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016335810',\n",
       "   'typecode': '110200',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '怀柔区',\n",
       "   'children': [{'typecode': ' 991400 ',\n",
       "     'address': ' 松梓镇上王峪村西书画山风景区附近 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 西南门 ',\n",
       "     'name': ' 书画山风景区(西南门) ',\n",
       "     'location': '116.478410,40.295856',\n",
       "     'id': ' B0FFJL0A85 '}],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B000A7QEBM',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.478397,40.295909',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-18 16:52:49',\n",
       "   'website': [],\n",
       "   'address': '桥梓镇上王峪村西',\n",
       "   'adcode': '110116',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '书画山风景区',\n",
       "   'location': '116.478932,40.296003',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F045020_4',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '4.6', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;风景名胜',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': '唐指山风景区',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5c068131abc88fdbe5bb8e44e56efed3'},\n",
       "    {'provider': [],\n",
       "     'title': '唐指山风景区',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/bdaa3639ac01524abc957956bfbb620e'},\n",
       "    {'provider': [],\n",
       "     'title': '唐指山风景区',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2c6a1b0eb2b69ec4a8350b3af1cccdb5'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016362510',\n",
       "   'typecode': '110200',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '顺义区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B000A0881B',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.799613,40.275706',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 02:53:55',\n",
       "   'website': [],\n",
       "   'address': '顺密路',\n",
       "   'adcode': '110113',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '唐指山风景区',\n",
       "   'location': '116.812851,40.27087',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F045023_2',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '40.00', 'rating': '4.9', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;国家级景点',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3552bf98b59ca3f4c3f6bc112fe300dd'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d14bad82606dfa6ace2fae2a3e5ed0ab'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/19ee790de72507d9a77c4436959a407d'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016606000',\n",
       "   'typecode': '110202',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '延庆区',\n",
       "   'children': [{'typecode': ' 991400 ',\n",
       "     'address': '  ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 入口 ',\n",
       "     'name': ' 龙庆峡风景区(入口) ',\n",
       "     'location': '116.011545,40.546039',\n",
       "     'id': ' B0FFIGDE5E '},\n",
       "    {'typecode': ' 991400 ',\n",
       "     'address': ' 旧县镇古城村北 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 南门 ',\n",
       "     'name': ' 龙庆峡风景区(南门) ',\n",
       "     'location': '116.011267,40.546120',\n",
       "     'id': ' B0FFFFFS9E '},\n",
       "    {'typecode': ' 070306 ',\n",
       "     'address': ' 龙庆峡风景区摆渡车站内 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '售票处',\n",
       "     'sname': ' 售票处 ',\n",
       "     'name': ' 龙庆峡风景区售票处 ',\n",
       "     'location': '116.011371,40.545995',\n",
       "     'id': ' B0FFFXQ8UB '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 旧县镇古城村北龙庆峡风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 停车场 ',\n",
       "     'name': ' 龙庆峡风景区停车场 ',\n",
       "     'location': '116.016849,40.536264',\n",
       "     'id': ' B000A83FHR '},\n",
       "    {'typecode': ' 150905 ',\n",
       "     'address': ' 旧小路龙庆峡风景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 停车场 ',\n",
       "     'name': ' 龙庆峡风景区停车场 ',\n",
       "     'location': '116.015493,40.536838',\n",
       "     'id': ' B0FFHBP4D3 '}],\n",
       "   'alias': '龙庆峡景区',\n",
       "   'tel': '010-69191034',\n",
       "   'id': 'B000A02891',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.016118,40.535546',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 18:21:46',\n",
       "   'website': 'www.longqingxia.cn',\n",
       "   'address': '旧县镇古城村北',\n",
       "   'adcode': '110119',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '龙庆峡风景区',\n",
       "   'location': '116.003394,40.551886',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F042016_13212',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '交通设施服务;公交车站;公交车站相关',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016225310',\n",
       "   'typecode': '150700',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '昌平区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'BV11217387',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2021-12-24 09:46:06',\n",
       "   'website': [],\n",
       "   'address': 'C111路',\n",
       "   'adcode': '110114',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '北京风景小区(公交站)',\n",
       "   'location': '116.290169,40.212864',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '10.00', 'rating': '4.7', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;风景名胜',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e386c94f13469f759b1139adf358a30d'},\n",
       "    {'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/6981b07309b66b7d8fecb5ff60649856'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/363431dccb922d3626ab66f35892948d'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6015073711',\n",
       "   'typecode': '110200',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '门头沟区',\n",
       "   'children': [{'typecode': ' 150904 ',\n",
       "     'address': ' 妙峰山镇灵溪风景区岭角民俗村 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 停车场 ',\n",
       "     'name': ' 灵溪风景区停车场 ',\n",
       "     'location': '115.976549,40.016965',\n",
       "     'id': ' B0FFGY4I9V '}],\n",
       "   'alias': [],\n",
       "   'tel': '010-61884642',\n",
       "   'id': 'B000A08880',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '115.97643,40.016754',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 18:18:18',\n",
       "   'website': [],\n",
       "   'address': '妙峰山镇岭角村',\n",
       "   'adcode': '110109',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '灵溪风景区',\n",
       "   'location': '115.966853,40.030147',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F048016_3',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '40.00', 'rating': '5.0', 'ticket_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '风景名胜;风景名胜;国家级景点',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/20b5ad4c424b9c76d41c711708643888'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4487e4f3604943f113b06c9d94c1e9ad'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f2479c133f3495dfdd8a53d81cc14664'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6017222500',\n",
       "   'typecode': '110202',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '平谷区',\n",
       "   'children': [{'typecode': ' 991400 ',\n",
       "     'address': ' 韩庄镇海子村金海湖 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 西1门 ',\n",
       "     'name': ' 金海湖(西1门) ',\n",
       "     'location': '117.300355,40.180500',\n",
       "     'id': ' B000A8Y9M9 '},\n",
       "    {'typecode': ' 991401 ',\n",
       "     'address': ' 金海湖镇 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 西门 ',\n",
       "     'name': ' 金海湖(西门) ',\n",
       "     'location': '117.301045,40.180620',\n",
       "     'id': ' B0FFHYHT8D '},\n",
       "    {'typecode': ' 070306 ',\n",
       "     'address': ' 金海湖景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '售票处',\n",
       "     'sname': ' 北京金海湖票务中心(平谷区旅游局南) ',\n",
       "     'name': ' 金海湖票务中心 ',\n",
       "     'location': '117.300802,40.180719',\n",
       "     'id': ' B000A8YA57 '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 韩庄镇海子村 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 停车场 ',\n",
       "     'name': ' 北京金海湖停车场 ',\n",
       "     'location': '117.300616,40.180751',\n",
       "     'id': ' B0HUYRSHRV '},\n",
       "    {'typecode': ' 150904 ',\n",
       "     'address': ' 韩海路韩庄镇海子村金海湖景区 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 停车场 ',\n",
       "     'name': ' 金海湖旅游度假风景区停车场 ',\n",
       "     'location': '117.300447,40.18108',\n",
       "     'id': ' B000AA12RD '}],\n",
       "   'alias': '金海湖文旅小镇',\n",
       "   'tel': '010-69992011;010-69993943;010-69991356',\n",
       "   'id': 'B000A08861',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '117.300656,40.180669',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 17:50:32',\n",
       "   'website': [],\n",
       "   'address': '金海湖镇坝前广场路1号',\n",
       "   'adcode': '110117',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '北京金海湖风景区',\n",
       "   'location': '117.302037,40.180693',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F046027_7373;6631;169',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '60575.00', 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '商务住宅;住宅区;住宅小区',\n",
       "   'photos': [{'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e05e3223e4e888fbadc207b4203f012a'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/afc0803fdfc00dfea0718a008923d90b'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/bd77945056e35bc4d9103c997638474a'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916736811',\n",
       "   'typecode': '120302',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [{'typecode': ' 991401 ',\n",
       "     'address': ' 芳园西路41号附近 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 西南门 ',\n",
       "     'name': ' 风景线(西南门) ',\n",
       "     'location': '116.481436,39.971262',\n",
       "     'id': ' B000A84JOV '},\n",
       "    {'typecode': ' 991400 ',\n",
       "     'address': ' 将台西路37号楼附近 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 东南门 ',\n",
       "     'name': ' 风景线(东南门) ',\n",
       "     'location': '116.483001,39.971313',\n",
       "     'id': ' B000A87O1K '},\n",
       "    {'typecode': ' 150905 ',\n",
       "     'address': ' 芳园里46/47号楼 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 停车场 ',\n",
       "     'name': ' 风景线停车场 ',\n",
       "     'location': '116.481599,39.971528',\n",
       "     'id': ' B000A82KVA '}],\n",
       "   'alias': '芳园里',\n",
       "   'tel': [],\n",
       "   'id': 'B000A843DV',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.481472,39.971220',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-17 01:02:19',\n",
       "   'website': [],\n",
       "   'address': '朝阳将台西路芳园里46-47号楼',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '大山子',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '风景线(将台西路)',\n",
       "   'location': '116.482155,39.97144',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F001020_499106',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '通行设施;临街院门;临街院正门',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8e44ce2364f6b24d51775d466469aed2'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016225320',\n",
       "   'typecode': '991401',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '昌平区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFIPG16D',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-18 11:33:00',\n",
       "   'website': [],\n",
       "   'address': '南邵北京风景68号院(南环路北)',\n",
       "   'adcode': '110114',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '北京风景西区(东门)',\n",
       "   'location': '116.290591,40.214103',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F046019_212464',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '79655.00', 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '商务住宅;住宅区;住宅小区',\n",
       "   'photos': [{'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4d569f1a2df4543a984c62326998f5ae'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3a8f5138927b5fe95fb285fd0707ce4e'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8a40cc3d7e8061215c41705907150e92'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916522620',\n",
       "   'typecode': '120302',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '大兴区',\n",
       "   'children': [{'typecode': ' 991400 ',\n",
       "     'address': ' 兴业大街 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 北门 ',\n",
       "     'name': ' 风景翠园(北门) ',\n",
       "     'location': '116.324223,39.776998',\n",
       "     'id': ' B000A83XH8 '}],\n",
       "   'alias': '风景翠园',\n",
       "   'tel': [],\n",
       "   'id': 'B000A88DJF',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.324225,39.777074',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-17 01:13:21',\n",
       "   'website': [],\n",
       "   'address': '黄村镇北西红门镇',\n",
       "   'adcode': '110115',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '清源',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '风景翠园(北兴路)',\n",
       "   'location': '116.325024,39.775586',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F003019_137748',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '商务住宅;住宅区;住宅小区',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/074caae03661b2efa503968fba20ab1b'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/a5341240310b691a8f3dab9927c1617d'},\n",
       "    {'title': '内景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/577eda043550649d761f7bd4c359aa9b'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916624000',\n",
       "   'typecode': '120302',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '丰台区',\n",
       "   'children': [{'typecode': ' 991400 ',\n",
       "     'address': ' 大瓦窑北路2号院 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 北门 ',\n",
       "     'name': ' 万科中粮·假日风景(北门) ',\n",
       "     'location': '116.249072,39.867467',\n",
       "     'id': ' B0FFGDB08N '}],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B000A850E1',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.250545,39.867697',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-18 10:30:56',\n",
       "   'website': [],\n",
       "   'address': '大瓦窑北路2号院',\n",
       "   'adcode': '110106',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '万科中粮·假日风景',\n",
       "   'location': '116.249831,39.866726',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '82486.00', 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '商务住宅;商务住宅相关;商务住宅相关',\n",
       "   'photos': [{'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d590f2be748fa0391c0dc55e245637ea'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d8e4165fb0e134cb37c99864489b661b'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0d3188a89cc0a9719a159c77b0dc59f0'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916614902',\n",
       "   'typecode': '120000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '丰台区',\n",
       "   'children': [{'typecode': ' 991400 ',\n",
       "     'address': ' 小屯西路56号院附近 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '门',\n",
       "     'sname': ' 西门 ',\n",
       "     'name': ' 万科中粮紫苑C区(西门) ',\n",
       "     'location': '116.247722,39.865824',\n",
       "     'id': ' B0FFIPFZYF '}],\n",
       "   'alias': '万科假日风景C区|大瓦窑北路2号院',\n",
       "   'tel': [],\n",
       "   'id': 'B000A9PSMT',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.250544,39.867641',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 13:13:06',\n",
       "   'website': [],\n",
       "   'address': '大瓦窑北路2号院',\n",
       "   'adcode': '110106',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '万科中粮紫苑C区',\n",
       "   'location': '116.249826,39.866724',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '45052.00', 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '商务住宅;住宅区;住宅小区',\n",
       "   'photos': [{'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e4c666bcd04d113d9b2f54bbbfa9ff98'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/91d437bc20b129381034d772a5154aca'},\n",
       "    {'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/321b92825f2cf490dd15ca60c2c950d9'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '6016225320',\n",
       "   'typecode': '120302',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '昌平区',\n",
       "   'children': [{'typecode': ' 150900 ',\n",
       "     'address': ' 京藏高速30(昌平城区)出口向东,南环大桥东侧1000米北京风景 ',\n",
       "     'distance': ' 0 ',\n",
       "     'subtype': '停车场',\n",
       "     'sname': ' 停车场 ',\n",
       "     'name': ' 北京风景二期停车场 ',\n",
       "     'location': '116.290297,40.214125',\n",
       "     'id': ' B0FFFPY0N7 '}],\n",
       "   'alias': [],\n",
       "   'tel': '010-69706666',\n",
       "   'id': 'B000A8XLNZ',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.290794,40.214219',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-17 01:08:33',\n",
       "   'website': [],\n",
       "   'address': '南邵镇双营西路',\n",
       "   'adcode': '110114',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '北京风景',\n",
       "   'location': '116.29104,40.215146',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'K50F046019_2593',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '通行设施;临街院门;临街院门',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9d1dda4685fc8ab12ebebdfef6c63e27'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916613921',\n",
       "   'typecode': '991400',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '丰台区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFK2N70Z',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.244678,39.864875',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 01:43:51',\n",
       "   'website': [],\n",
       "   'address': '卢沟桥假日风景D区东门(小屯西路)',\n",
       "   'adcode': '110106',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': [],\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '假日风景D区(东门)',\n",
       "   'location': '116.244628,39.864872',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： https://restapi.amap.com/v3/place/text?parameters\n",
    "text_url = \"https://restapi.amap.com/v3/place/text?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"keywords\":\"风景\",\n",
    "    \"city\":\"北京\",\n",
    "    \"extensions\":\"all\",\n",
    "    \"children\":1\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=text_url, params=payload) \n",
    "r\n",
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "286031d4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [],\n",
       "  'cities': [{'citycode': '010',\n",
       "    'adcode': '110000',\n",
       "    'num': '7980',\n",
       "    'name': '北京市'},\n",
       "   {'citycode': '0539', 'adcode': '371300', 'num': '3808', 'name': '临沂市'},\n",
       "   {'citycode': '020', 'adcode': '440100', 'num': '3807', 'name': '广州市'},\n",
       "   {'citycode': '022', 'adcode': '120000', 'num': '2814', 'name': '天津市'},\n",
       "   {'citycode': '021', 'adcode': '310000', 'num': '2713', 'name': '上海市'},\n",
       "   {'citycode': '0311', 'adcode': '130100', 'num': '2591', 'name': '石家庄市'},\n",
       "   {'citycode': '0536', 'adcode': '370700', 'num': '2408', 'name': '潍坊市'},\n",
       "   {'citycode': '0757', 'adcode': '440600', 'num': '2309', 'name': '佛山市'},\n",
       "   {'citycode': '0370', 'adcode': '411400', 'num': '2247', 'name': '商丘市'},\n",
       "   {'citycode': '028', 'adcode': '510100', 'num': '2186', 'name': '成都市'},\n",
       "   {'citycode': '0551', 'adcode': '340100', 'num': '2125', 'name': '合肥市'},\n",
       "   {'citycode': '0359', 'adcode': '140800', 'num': '1782', 'name': '运城市'},\n",
       "   {'citycode': '0319', 'adcode': '130500', 'num': '1782', 'name': '邢台市'},\n",
       "   {'citycode': '1852', 'adcode': '810000', 'num': '1721', 'name': '香港特别行政区'},\n",
       "   {'citycode': '0635', 'adcode': '371500', 'num': '1721', 'name': '聊城市'},\n",
       "   {'citycode': '0310', 'adcode': '130400', 'num': '1720', 'name': '邯郸市'},\n",
       "   {'citycode': '0312', 'adcode': '130600', 'num': '1620', 'name': '保定市'},\n",
       "   {'citycode': '0755', 'adcode': '440300', 'num': '1499', 'name': '深圳市'},\n",
       "   {'citycode': '0374', 'adcode': '411000', 'num': '1499', 'name': '许昌市'},\n",
       "   {'citycode': '0534', 'adcode': '371400', 'num': '1498', 'name': '德州市'},\n",
       "   {'citycode': '0516', 'adcode': '320300', 'num': '1498', 'name': '徐州市'},\n",
       "   {'citycode': '027', 'adcode': '420100', 'num': '1498', 'name': '武汉市'},\n",
       "   {'citycode': '0543', 'adcode': '371600', 'num': '1438', 'name': '滨州市'},\n",
       "   {'citycode': '0512', 'adcode': '320500', 'num': '1398', 'name': '苏州市'},\n",
       "   {'citycode': '0371', 'adcode': '410100', 'num': '1337', 'name': '郑州市'},\n",
       "   {'citycode': '0431', 'adcode': '220100', 'num': '1276', 'name': '长春市'},\n",
       "   {'citycode': '0591', 'adcode': '350100', 'num': '1215', 'name': '福州市'},\n",
       "   {'citycode': '0871', 'adcode': '530100', 'num': '1154', 'name': '昆明市'},\n",
       "   {'citycode': '0576', 'adcode': '331000', 'num': '1154', 'name': '台州市'},\n",
       "   {'citycode': '0574', 'adcode': '330200', 'num': '1154', 'name': '宁波市'},\n",
       "   {'citycode': '0553', 'adcode': '340200', 'num': '1154', 'name': '芜湖市'},\n",
       "   {'citycode': '0537', 'adcode': '370800', 'num': '1154', 'name': '济宁市'},\n",
       "   {'citycode': '029', 'adcode': '610100', 'num': '1154', 'name': '西安市'},\n",
       "   {'citycode': '0730', 'adcode': '430600', 'num': '1093', 'name': '岳阳市'},\n",
       "   {'citycode': '0631', 'adcode': '371000', 'num': '1093', 'name': '威海市'},\n",
       "   {'citycode': '0530', 'adcode': '371700', 'num': '1093', 'name': '菏泽市'},\n",
       "   {'citycode': '0514', 'adcode': '321000', 'num': '1093', 'name': '扬州市'},\n",
       "   {'citycode': '0378', 'adcode': '410200', 'num': '1093', 'name': '开封市'},\n",
       "   {'citycode': '0315', 'adcode': '130200', 'num': '1093', 'name': '唐山市'},\n",
       "   {'citycode': '024', 'adcode': '210100', 'num': '1093', 'name': '沈阳市'},\n",
       "   {'citycode': '0791', 'adcode': '360100', 'num': '1033', 'name': '南昌市'},\n",
       "   {'citycode': '0511', 'adcode': '321100', 'num': '1032', 'name': '镇江市'},\n",
       "   {'citycode': '0317', 'adcode': '130900', 'num': '1032', 'name': '沧州市'},\n",
       "   {'citycode': '023', 'adcode': '500000', 'num': '993', 'name': '重庆市'},\n",
       "   {'citycode': '0769', 'adcode': '441900', 'num': '872', 'name': '东莞市'},\n",
       "   {'citycode': '0733', 'adcode': '430200', 'num': '871', 'name': '株洲市'},\n",
       "   {'citycode': '0573', 'adcode': '330400', 'num': '871', 'name': '嘉兴市'},\n",
       "   {'citycode': '0357', 'adcode': '141000', 'num': '871', 'name': '临汾市'},\n",
       "   {'citycode': '0953', 'adcode': '640300', 'num': '810', 'name': '吴忠市'},\n",
       "   {'citycode': '0838', 'adcode': '510600', 'num': '810', 'name': '德阳市'},\n",
       "   {'citycode': '0632', 'adcode': '370400', 'num': '810', 'name': '枣庄市'},\n",
       "   {'citycode': '0595', 'adcode': '350500', 'num': '810', 'name': '泉州市'},\n",
       "   {'citycode': '0550', 'adcode': '341100', 'num': '810', 'name': '滁州市'},\n",
       "   {'citycode': '0519', 'adcode': '320400', 'num': '810', 'name': '常州市'},\n",
       "   {'citycode': '0852', 'adcode': '520300', 'num': '749', 'name': '遵义市'},\n",
       "   {'citycode': '0797', 'adcode': '360700', 'num': '749', 'name': '赣州市'},\n",
       "   {'citycode': '0575', 'adcode': '330600', 'num': '749', 'name': '绍兴市'},\n",
       "   {'citycode': '0571', 'adcode': '330100', 'num': '749', 'name': '杭州市'},\n",
       "   {'citycode': '0532', 'adcode': '370200', 'num': '749', 'name': '青岛市'},\n",
       "   {'citycode': '0518', 'adcode': '320700', 'num': '749', 'name': '连云港市'},\n",
       "   {'citycode': '0917', 'adcode': '610300', 'num': '688', 'name': '宝鸡市'},\n",
       "   {'citycode': '0870', 'adcode': '530600', 'num': '688', 'name': '昭通市'},\n",
       "   {'citycode': '0816', 'adcode': '510700', 'num': '688', 'name': '绵阳市'},\n",
       "   {'citycode': '0731', 'adcode': '430100', 'num': '688', 'name': '长沙市'},\n",
       "   {'citycode': '0577', 'adcode': '330300', 'num': '688', 'name': '温州市'},\n",
       "   {'citycode': '0570', 'adcode': '330800', 'num': '688', 'name': '衢州市'},\n",
       "   {'citycode': '0555', 'adcode': '340500', 'num': '688', 'name': '马鞍山市'},\n",
       "   {'citycode': '0510', 'adcode': '320200', 'num': '688', 'name': '无锡市'},\n",
       "   {'citycode': '0475', 'adcode': '150500', 'num': '688', 'name': '通辽市'},\n",
       "   {'citycode': '0459', 'adcode': '230600', 'num': '688', 'name': '大庆市'},\n",
       "   {'citycode': '0451', 'adcode': '230100', 'num': '688', 'name': '哈尔滨市'},\n",
       "   {'citycode': '0421', 'adcode': '211300', 'num': '688', 'name': '朝阳市'},\n",
       "   {'citycode': '0419', 'adcode': '211000', 'num': '688', 'name': '辽阳市'},\n",
       "   {'citycode': '0396', 'adcode': '411700', 'num': '688', 'name': '驻马店市'},\n",
       "   {'citycode': '0592', 'adcode': '350200', 'num': '527', 'name': '厦门市'},\n",
       "   {'citycode': '0531', 'adcode': '370100', 'num': '527', 'name': '济南市'},\n",
       "   {'citycode': '0355', 'adcode': '140400', 'num': '527', 'name': '长治市'},\n",
       "   {'citycode': '0931', 'adcode': '620100', 'num': '466', 'name': '兰州市'},\n",
       "   {'citycode': '0912', 'adcode': '610800', 'num': '466', 'name': '榆林市'},\n",
       "   {'citycode': '0911', 'adcode': '610600', 'num': '466', 'name': '延安市'},\n",
       "   {'citycode': '0872', 'adcode': '532900', 'num': '466', 'name': '大理白族自治州'},\n",
       "   {'citycode': '0579', 'adcode': '330700', 'num': '466', 'name': '金华市'},\n",
       "   {'citycode': '0563', 'adcode': '341800', 'num': '466', 'name': '宣城市'},\n",
       "   {'citycode': '0535', 'adcode': '370600', 'num': '466', 'name': '烟台市'},\n",
       "   {'citycode': '0533', 'adcode': '370300', 'num': '466', 'name': '淄博市'},\n",
       "   {'citycode': '0471', 'adcode': '150100', 'num': '466', 'name': '呼和浩特市'},\n",
       "   {'citycode': '0377', 'adcode': '411300', 'num': '466', 'name': '南阳市'},\n",
       "   {'citycode': '1935', 'adcode': '620600', 'num': '405', 'name': '武威市'},\n",
       "   {'citycode': '0951', 'adcode': '640100', 'num': '405', 'name': '银川市'},\n",
       "   {'citycode': '0913', 'adcode': '610500', 'num': '405', 'name': '渭南市'},\n",
       "   {'citycode': '0837', 'adcode': '513200', 'num': '405', 'name': '阿坝藏族羌族自治州'},\n",
       "   {'citycode': '0813', 'adcode': '510300', 'num': '405', 'name': '自贡市'},\n",
       "   {'citycode': '0773', 'adcode': '450300', 'num': '405', 'name': '桂林市'},\n",
       "   {'citycode': '0771', 'adcode': '450100', 'num': '405', 'name': '南宁市'},\n",
       "   {'citycode': '0760', 'adcode': '442000', 'num': '405', 'name': '中山市'},\n",
       "   {'citycode': '0752', 'adcode': '441300', 'num': '405', 'name': '惠州市'},\n",
       "   {'citycode': '0716', 'adcode': '421000', 'num': '405', 'name': '荆州市'},\n",
       "   {'citycode': '0713', 'adcode': '421100', 'num': '405', 'name': '黄冈市'},\n",
       "   {'citycode': '0668', 'adcode': '440900', 'num': '405', 'name': '茂名市'},\n",
       "   {'citycode': '0662', 'adcode': '441700', 'num': '405', 'name': '阳江市'},\n",
       "   {'citycode': '0633', 'adcode': '371100', 'num': '405', 'name': '日照市'},\n",
       "   {'citycode': '0572', 'adcode': '330500', 'num': '405', 'name': '湖州市'},\n",
       "   {'citycode': '0538', 'adcode': '370900', 'num': '405', 'name': '泰安市'},\n",
       "   {'citycode': '0477', 'adcode': '150600', 'num': '405', 'name': '鄂尔多斯市'},\n",
       "   {'citycode': '0456', 'adcode': '231100', 'num': '405', 'name': '黑河市'},\n",
       "   {'citycode': '0416', 'adcode': '210700', 'num': '405', 'name': '锦州市'},\n",
       "   {'citycode': '0411', 'adcode': '210200', 'num': '405', 'name': '大连市'},\n",
       "   {'citycode': '0394', 'adcode': '411600', 'num': '405', 'name': '周口市'},\n",
       "   {'citycode': '0379', 'adcode': '410300', 'num': '405', 'name': '洛阳市'},\n",
       "   {'citycode': '0373', 'adcode': '410700', 'num': '405', 'name': '新乡市'},\n",
       "   {'citycode': '0356', 'adcode': '140500', 'num': '405', 'name': '晋城市'},\n",
       "   {'citycode': '0351', 'adcode': '140100', 'num': '405', 'name': '太原市'},\n",
       "   {'citycode': '0318', 'adcode': '131100', 'num': '405', 'name': '衡水市'},\n",
       "   {'citycode': '0316', 'adcode': '131000', 'num': '405', 'name': '廊坊市'},\n",
       "   {'citycode': '0314', 'adcode': '130800', 'num': '405', 'name': '承德市'},\n",
       "   {'citycode': '1906', 'adcode': '659005', 'num': '344', 'name': '北屯市'},\n",
       "   {'citycode': '1728', 'adcode': '429006', 'num': '344', 'name': '天门市'},\n",
       "   {'citycode': '0991', 'adcode': '650100', 'num': '344', 'name': '乌鲁木齐市'},\n",
       "   {'citycode': '0977',\n",
       "    'adcode': '632800',\n",
       "    'num': '344',\n",
       "    'name': '海西蒙古族藏族自治州'},\n",
       "   {'citycode': '0903', 'adcode': '653200', 'num': '344', 'name': '和田地区'},\n",
       "   {'citycode': '0899', 'adcode': '460200', 'num': '344', 'name': '三亚市'},\n",
       "   {'citycode': '0877', 'adcode': '530400', 'num': '344', 'name': '玉溪市'},\n",
       "   {'citycode': '0876', 'adcode': '532600', 'num': '344', 'name': '文山壮族苗族自治州'},\n",
       "   {'citycode': '0873',\n",
       "    'adcode': '532500',\n",
       "    'num': '344',\n",
       "    'name': '红河哈尼族彝族自治州'},\n",
       "   {'citycode': '0859',\n",
       "    'adcode': '522300',\n",
       "    'num': '344',\n",
       "    'name': '黔西南布依族苗族自治州'},\n",
       "   {'citycode': '0835', 'adcode': '511800', 'num': '344', 'name': '雅安市'},\n",
       "   {'citycode': '0827', 'adcode': '511900', 'num': '344', 'name': '巴中市'},\n",
       "   {'citycode': '0798', 'adcode': '360200', 'num': '344', 'name': '景德镇市'},\n",
       "   {'citycode': '0796', 'adcode': '360800', 'num': '344', 'name': '吉安市'},\n",
       "   {'citycode': '0768', 'adcode': '445100', 'num': '344', 'name': '潮州市'},\n",
       "   {'citycode': '0766', 'adcode': '445300', 'num': '344', 'name': '云浮市'},\n",
       "   {'citycode': '0745', 'adcode': '431200', 'num': '344', 'name': '怀化市'},\n",
       "   {'citycode': '0743',\n",
       "    'adcode': '433100',\n",
       "    'num': '344',\n",
       "    'name': '湘西土家族苗族自治州'},\n",
       "   {'citycode': '0735', 'adcode': '431000', 'num': '344', 'name': '郴州市'},\n",
       "   {'citycode': '0724', 'adcode': '420800', 'num': '344', 'name': '荆门市'},\n",
       "   {'citycode': '0714', 'adcode': '420200', 'num': '344', 'name': '黄石市'},\n",
       "   {'citycode': '0710', 'adcode': '420600', 'num': '344', 'name': '襄阳市'},\n",
       "   {'citycode': '0596', 'adcode': '350600', 'num': '344', 'name': '漳州市'},\n",
       "   {'citycode': '0564', 'adcode': '341500', 'num': '344', 'name': '六安市'},\n",
       "   {'citycode': '0556', 'adcode': '340800', 'num': '344', 'name': '安庆市'},\n",
       "   {'citycode': '0472', 'adcode': '150200', 'num': '344', 'name': '包头市'},\n",
       "   {'citycode': '0439', 'adcode': '220600', 'num': '344', 'name': '白山市'},\n",
       "   {'citycode': '0354', 'adcode': '140700', 'num': '344', 'name': '晋中市'},\n",
       "   {'citycode': '0350', 'adcode': '140900', 'num': '344', 'name': '忻州市'},\n",
       "   {'citycode': '0349', 'adcode': '140600', 'num': '344', 'name': '朔州市'},\n",
       "   {'citycode': '0335', 'adcode': '130300', 'num': '344', 'name': '秦皇岛市'},\n",
       "   {'citycode': '0313', 'adcode': '130700', 'num': '344', 'name': '张家口市'},\n",
       "   {'citycode': '025', 'adcode': '320100', 'num': '344', 'name': '南京市'},\n",
       "   {'citycode': '0523', 'adcode': '321200', 'num': '244', 'name': '泰州市'},\n",
       "   {'citycode': '0793', 'adcode': '361100', 'num': '183', 'name': '上饶市'},\n",
       "   {'citycode': '1558', 'adcode': '341200', 'num': '122', 'name': '阜阳市'},\n",
       "   {'citycode': '0934', 'adcode': '621000', 'num': '122', 'name': '庆阳市'},\n",
       "   {'citycode': '0910', 'adcode': '610400', 'num': '122', 'name': '咸阳市'},\n",
       "   {'citycode': '0857', 'adcode': '520500', 'num': '122', 'name': '毕节市'},\n",
       "   {'citycode': '0839', 'adcode': '510800', 'num': '122', 'name': '广元市'},\n",
       "   {'citycode': '0795', 'adcode': '360900', 'num': '122', 'name': '宜春市'},\n",
       "   {'citycode': '0776', 'adcode': '451000', 'num': '122', 'name': '百色市'},\n",
       "   {'citycode': '0691', 'adcode': '532800', 'num': '122', 'name': '西双版纳傣族自治州'},\n",
       "   {'citycode': '0527', 'adcode': '321300', 'num': '122', 'name': '宿迁市'},\n",
       "   {'citycode': '0391', 'adcode': '410800', 'num': '122', 'name': '焦作市'},\n",
       "   {'citycode': '0376', 'adcode': '411500', 'num': '122', 'name': '信阳市'},\n",
       "   {'citycode': '1886', 'adcode': '710000', 'num': '61', 'name': '台湾省'},\n",
       "   {'citycode': '1772', 'adcode': '451300', 'num': '61', 'name': '来宾市'},\n",
       "   {'citycode': '0997', 'adcode': '652900', 'num': '61', 'name': '阿克苏地区'},\n",
       "   {'citycode': '0971', 'adcode': '630100', 'num': '61', 'name': '西宁市'},\n",
       "   {'citycode': '0938', 'adcode': '620500', 'num': '61', 'name': '天水市'},\n",
       "   {'citycode': '0919', 'adcode': '610200', 'num': '61', 'name': '铜川市'},\n",
       "   {'citycode': '0895', 'adcode': '540300', 'num': '61', 'name': '昌都市'},\n",
       "   {'citycode': '0892', 'adcode': '540200', 'num': '61', 'name': '日喀则市'},\n",
       "   {'citycode': '0878', 'adcode': '532300', 'num': '61', 'name': '楚雄彝族自治州'},\n",
       "   {'citycode': '0856', 'adcode': '520600', 'num': '61', 'name': '铜仁市'},\n",
       "   {'citycode': '0853', 'adcode': '520400', 'num': '61', 'name': '安顺市'},\n",
       "   {'citycode': '0851', 'adcode': '520100', 'num': '61', 'name': '贵阳市'},\n",
       "   {'citycode': '0836', 'adcode': '513300', 'num': '61', 'name': '甘孜藏族自治州'},\n",
       "   {'citycode': '0834', 'adcode': '513400', 'num': '61', 'name': '凉山彝族自治州'},\n",
       "   {'citycode': '0818', 'adcode': '511700', 'num': '61', 'name': '达州市'},\n",
       "   {'citycode': '0817', 'adcode': '511300', 'num': '61', 'name': '南充市'},\n",
       "   {'citycode': '0805', 'adcode': '460400', 'num': '61', 'name': '儋州市'},\n",
       "   {'citycode': '0799', 'adcode': '360300', 'num': '61', 'name': '萍乡市'},\n",
       "   {'citycode': '0778', 'adcode': '451200', 'num': '61', 'name': '河池市'},\n",
       "   {'citycode': '0775', 'adcode': '450900', 'num': '61', 'name': '玉林市'},\n",
       "   {'citycode': '0774', 'adcode': '450400', 'num': '61', 'name': '梧州市'},\n",
       "   {'citycode': '0763', 'adcode': '441800', 'num': '61', 'name': '清远市'},\n",
       "   {'citycode': '0758', 'adcode': '441200', 'num': '61', 'name': '肇庆市'},\n",
       "   {'citycode': '0754', 'adcode': '440500', 'num': '61', 'name': '汕头市'},\n",
       "   {'citycode': '0744', 'adcode': '430800', 'num': '61', 'name': '张家界市'},\n",
       "   {'citycode': '0738', 'adcode': '431300', 'num': '61', 'name': '娄底市'},\n",
       "   {'citycode': '0736', 'adcode': '430700', 'num': '61', 'name': '常德市'},\n",
       "   {'citycode': '0732', 'adcode': '430300', 'num': '61', 'name': '湘潭市'},\n",
       "   {'citycode': '0718', 'adcode': '422800', 'num': '61', 'name': '恩施土家族苗族自治州'},\n",
       "   {'citycode': '0715', 'adcode': '421200', 'num': '61', 'name': '咸宁市'},\n",
       "   {'citycode': '0663', 'adcode': '445200', 'num': '61', 'name': '揭阳市'},\n",
       "   {'citycode': '0660', 'adcode': '441500', 'num': '61', 'name': '汕尾市'},\n",
       "   {'citycode': '0594', 'adcode': '350300', 'num': '61', 'name': '莆田市'},\n",
       "   {'citycode': '0561', 'adcode': '340600', 'num': '61', 'name': '淮北市'},\n",
       "   {'citycode': '0559', 'adcode': '341000', 'num': '61', 'name': '黄山市'},\n",
       "   {'citycode': '0557', 'adcode': '341300', 'num': '61', 'name': '宿州市'},\n",
       "   {'citycode': '0554', 'adcode': '340400', 'num': '61', 'name': '淮南市'},\n",
       "   {'citycode': '0513', 'adcode': '320600', 'num': '61', 'name': '南通市'},\n",
       "   {'citycode': '0482', 'adcode': '152200', 'num': '61', 'name': '兴安盟'},\n",
       "   {'citycode': '0473', 'adcode': '150300', 'num': '61', 'name': '乌海市'},\n",
       "   {'citycode': '0455', 'adcode': '231200', 'num': '61', 'name': '绥化市'},\n",
       "   {'citycode': '0452', 'adcode': '230200', 'num': '61', 'name': '齐齐哈尔市'},\n",
       "   {'citycode': '0435', 'adcode': '220500', 'num': '61', 'name': '通化市'},\n",
       "   {'citycode': '0429', 'adcode': '211400', 'num': '61', 'name': '葫芦岛市'},\n",
       "   {'citycode': '0418', 'adcode': '210900', 'num': '61', 'name': '阜新市'},\n",
       "   {'citycode': '0410', 'adcode': '211200', 'num': '61', 'name': '铁岭市'},\n",
       "   {'citycode': '0395', 'adcode': '411100', 'num': '61', 'name': '漯河市'}]},\n",
       " 'count': '0',\n",
       " 'infocode': '10000',\n",
       " 'pois': [],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "text_url = \"https://restapi.amap.com/v3/place/text?parameters\"\n",
    "\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"keywords\":\"汽车\",\n",
    "    \"extensions\":\"all\",\n",
    "    \"children\":1\n",
    "}\n",
    "# 未指定city，并且搜索的为泛词（例如“美食”）的情况下，返回的内容为城市列表以及此城市内有多少结果符合要求。\n",
    "r = requests.get(url=text_url, params=payload) \n",
    "r\n",
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bd978f22",
   "metadata": {},
   "source": [
    "### 周边搜索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "1eabcb90",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>参数名</th>\n",
       "      <th>参数名.1</th>\n",
       "      <th>含义</th>\n",
       "      <th>规则说明</th>\n",
       "      <th>是否必须</th>\n",
       "      <th>缺省值</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>key</td>\n",
       "      <td>key</td>\n",
       "      <td>请求服务权限标识</td>\n",
       "      <td>用户在高德地图官网申请Web服务API类型KEY</td>\n",
       "      <td>必填</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>location</td>\n",
       "      <td>location</td>\n",
       "      <td>中心点坐标</td>\n",
       "      <td>规则： 经度和纬度用\",\"分割，经度在前，纬度在后，经纬度小数点后不得超过6位</td>\n",
       "      <td>必填</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>keywords</td>\n",
       "      <td>keywords</td>\n",
       "      <td>查询关键字</td>\n",
       "      <td>规则： 多个关键字用“|”分割</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>types</td>\n",
       "      <td>types</td>\n",
       "      <td>查询POI类型</td>\n",
       "      <td>多个类型用“|”分割；可选值：分类代码 或 汉字 （若用汉字，请严格按照附件之中的汉字填写）...</td>\n",
       "      <td>可选</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>city</td>\n",
       "      <td>city</td>\n",
       "      <td>查询城市</td>\n",
       "      <td>可选值：城市中文、中文全拼、citycode、adcode如：北京/beijing/010/...</td>\n",
       "      <td>可选</td>\n",
       "      <td>无（全国范围内搜索）</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>radius</td>\n",
       "      <td>radius</td>\n",
       "      <td>查询半径</td>\n",
       "      <td>取值范围:0-50000。规则：大于50000按默认值，单位：米</td>\n",
       "      <td>可选</td>\n",
       "      <td>3000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>sortrule</td>\n",
       "      <td>sortrule</td>\n",
       "      <td>排序规则</td>\n",
       "      <td>规定返回结果的排序规则。按距离排序：distance；综合排序：weight</td>\n",
       "      <td>可选</td>\n",
       "      <td>distance</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>offset</td>\n",
       "      <td>offset</td>\n",
       "      <td>每页记录数据</td>\n",
       "      <td>强烈建议不超过25，若超过25可能造成访问报错</td>\n",
       "      <td>可选</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>page</td>\n",
       "      <td>page</td>\n",
       "      <td>当前页数</td>\n",
       "      <td>最大翻页数100</td>\n",
       "      <td>可选</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>extensions</td>\n",
       "      <td>extensions</td>\n",
       "      <td>返回结果控制</td>\n",
       "      <td>此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。</td>\n",
       "      <td>可选</td>\n",
       "      <td>base</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>sig</td>\n",
       "      <td>sig</td>\n",
       "      <td>数字签名</td>\n",
       "      <td>数字签名获取和使用方法</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>output</td>\n",
       "      <td>output</td>\n",
       "      <td>返回数据格式类型</td>\n",
       "      <td>可选值：JSON，XML</td>\n",
       "      <td>可选</td>\n",
       "      <td>JSON</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>callback</td>\n",
       "      <td>callback</td>\n",
       "      <td>回调函数</td>\n",
       "      <td>callback值是用户定义的函数名称，此参数只在output=JSON时有效</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           参数名       参数名.1        含义  \\\n",
       "0          key         key  请求服务权限标识   \n",
       "1     location    location     中心点坐标   \n",
       "2     keywords    keywords     查询关键字   \n",
       "3        types       types   查询POI类型   \n",
       "4         city        city      查询城市   \n",
       "5       radius      radius      查询半径   \n",
       "6     sortrule    sortrule      排序规则   \n",
       "7       offset      offset    每页记录数据   \n",
       "8         page        page      当前页数   \n",
       "9   extensions  extensions    返回结果控制   \n",
       "10         sig         sig      数字签名   \n",
       "11      output      output  返回数据格式类型   \n",
       "12    callback    callback      回调函数   \n",
       "\n",
       "                                                 规则说明 是否必须         缺省值  \n",
       "0                            用户在高德地图官网申请Web服务API类型KEY   必填           无  \n",
       "1             规则： 经度和纬度用\",\"分割，经度在前，纬度在后，经纬度小数点后不得超过6位   必填           无  \n",
       "2                                     规则： 多个关键字用“|”分割   可选           无  \n",
       "3   多个类型用“|”分割；可选值：分类代码 或 汉字 （若用汉字，请严格按照附件之中的汉字填写）...   可选         NaN  \n",
       "4   可选值：城市中文、中文全拼、citycode、adcode如：北京/beijing/010/...   可选  无（全国范围内搜索）  \n",
       "5                    取值范围:0-50000。规则：大于50000按默认值，单位：米   可选        3000  \n",
       "6              规定返回结果的排序规则。按距离排序：distance；综合排序：weight   可选    distance  \n",
       "7                             强烈建议不超过25，若超过25可能造成访问报错   可选          20  \n",
       "8                                            最大翻页数100   可选           1  \n",
       "9        此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。   可选        base  \n",
       "10                                        数字签名获取和使用方法   可选           无  \n",
       "11                                       可选值：JSON，XML   可选        JSON  \n",
       "12            callback值是用户定义的函数名称，此参数只在output=JSON时有效   可选           无  "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_html(\"\"\"<div class=\"md-atomic\"><div class=\"table-container\" style=\"width:100%;\"><table class=\"md-table  \" data-meta=\"%7B%22width%22%3A%22100%25%22%7D\"><tbody><tr><th colspan=\"2\" style=\"white-space:nowrap;\"><p>参数名</p></th><th><p>含义</p></th><th><p>规则说明</p></th><th style=\"white-space:nowrap;\"><p>是否必须</p></th><th><p>缺省值</p></th></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>key</p></td><td><p>请求服务权限标识</p></td><td><p>用户在高德地图官网<a href=\"https://lbs.amap.com/dev/\" class=\"\" target=\"_blank\">申请Web服务API类型KEY</a></p></td><td style=\"white-space:nowrap;\"><p>必填</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>location</p></td><td><p>中心点坐标</p></td><td><p>规则： 经度和纬度用\",\"分割，经度在前，纬度在后，经纬度小数点后不得超过6位</p></td><td style=\"white-space:nowrap;\"><p>必填</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>keywords</p></td><td><p>查询关键字</p></td><td><p>规则： 多个关键字用“|”分割</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>types</p></td><td><p>查询POI类型</p></td><td><p>多个类型用“|”分割；</p><p>可选值：分类代码 或 汉字 （若用汉字，请严格按照附件之中的汉字填写）&nbsp;</p><p>分类代码由六位数字组成，一共分为三个部分，前两个数字代表大类；中间两个数字代表中类；最后两个数字代表小类。</p><p>若指定了某个大类，则所属的中类、小类都会被显示。</p><p>例如：010000为汽车服务（大类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010100为加油站（中类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010101为中国石化（小类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010900为汽车租赁（中类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010901为汽车租赁还车（小类）</p><p>当指定010000，则010100等中类、010101等小类都会被包含。</p><p>当指定010900，则010901等小类都会被包含</p><p><a href=\"https://lbs.amap.com/api/webservice/download\" class=\"\" target=\"_blank\">下载POI分类编码和城市编码表</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p><p><br></p><p><strong>当keywords和types均为空的时候，默认指定types为050000（餐饮服务）、070000（生活服务）、120000（商务住宅）</strong></p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p><br></p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>city</p></td><td><p>查询城市</p></td><td><p>可选值：城市中文、中文全拼、citycode、adcode</p><p>如：北京/beijing/010/110000</p><p>当用户指定的经纬度和city出现冲突，若范围内有用户指定city的数据，则返回相关数据，否则返回为空。</p><p>如：经纬度指定石家庄，而city却指定天津，若搜索范围内有天津的数据则返回相关数据，否则返回为空。</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>无（全国范围内搜索）</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>radius</p></td><td><p>查询半径</p></td><td><p>取值范围:0-50000。规则：大于50000按默认值，单位：米</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>3000</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>sortrule</p></td><td><p>排序规则</p></td><td><p>规定返回结果的排序规则。</p><p>按距离排序：distance；综合排序：weight</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>distance</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>offset</p></td><td><p>每页记录数据</p></td><td><p>强烈建议不超过25，若超过25可能造成访问报错</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>20</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>page</p></td><td><p>当前页数</p></td><td><p>最大翻页数100</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>1</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>extensions</p></td><td><p>返回结果控制</p></td><td><p>此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>base</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>sig</p></td><td><p>数字签名</p></td><td><p><a href=\"https://lbs.amap.com/faq/account/key/72\" class=\"\" target=\"_blank\">数字签名获取和使用方法</a></p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>output</p></td><td><p>返回数据格式类型</p></td><td><p>可选值：JSON，XML</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>JSON</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>callback</p></td><td><p>回调函数</p></td><td><p>callback值是用户定义的函数名称，此参数只在output=JSON时有效</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td><p>无</p></td></tr></tbody></table></div></div>\"\"\")[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "6f9f8d7c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '83',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': 'B0HRD7YD1E',\n",
       "   'address': '涿州市',\n",
       "   'distance': '987',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'biz_type': [],\n",
       "   'cityname': '保定市',\n",
       "   'type': '地名地址信息;自然地名;河流',\n",
       "   'photos': [],\n",
       "   'typecode': '190204',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'childtype': '7',\n",
       "   'adname': '涿州市',\n",
       "   'name': '永定河',\n",
       "   'location': '116.240920,39.547998',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGBEUDI'},\n",
       "  {'parent': [],\n",
       "   'address': '南蔡村',\n",
       "   'distance': '1017',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '涿州市锦中苑食品有限公司',\n",
       "   'location': '116.227311,39.551192',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0H1CM4ATF'},\n",
       "  {'parent': [],\n",
       "   'address': '春光街与春风路交叉口北约200米',\n",
       "   'distance': '2474',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '小吃店',\n",
       "   'location': '116.225943,39.520924',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0GUVHVKWG'},\n",
       "  {'parent': [],\n",
       "   'address': '春光街涿州市长安城村幼儿园东侧约150米',\n",
       "   'distance': '2474',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '东北烧烤',\n",
       "   'location': '116.226380,39.520857',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0HR0BODTP'},\n",
       "  {'parent': [],\n",
       "   'address': '马雷欢妞农场北190米',\n",
       "   'distance': '2656',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '言秀小吃店',\n",
       "   'location': '116.202857,39.551354',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0GU9UTV8H'},\n",
       "  {'parent': [],\n",
       "   'address': '义和庄镇长安城村',\n",
       "   'distance': '2703',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '4.1',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/10594453-64ff-4d49-89f4-d2840abd2046.jpg'},\n",
       "    {'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/e27fe484-ee64-43b0-88dd-bdf7c2d9da00.jpg'},\n",
       "    {'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/faf0411f-653a-435e-abb8-569622b7b821.jpg'}],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '大辉鱼馆',\n",
       "   'location': '116.229681,39.518460',\n",
       "   'tel': '13634505050;15132411155',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFJMI1Y6'},\n",
       "  {'parent': [],\n",
       "   'address': '义和庄乡',\n",
       "   'distance': '3037',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'level': [],\n",
       "    'rating': '4.4',\n",
       "    'open_time': [],\n",
       "    'ticket_ordering': '0'},\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '保定市',\n",
       "   'type': '风景名胜;风景名胜;风景名胜',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4767257d1ad57d8e234da6802c5b7f4b'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/843c6353a8f6dc870f137b65d9b42e57'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/870eb4be18b807a71fbbade06117ce95'}],\n",
       "   'typecode': '110200',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '北蔡梨苑景区',\n",
       "   'location': '116.211776,39.565255',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B01380SJ8R'},\n",
       "  {'parent': [],\n",
       "   'address': '义和庄乡北蔡梨苑景区附近',\n",
       "   'distance': '3044',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'level': [],\n",
       "    'rating': '4.2',\n",
       "    'open_time': [],\n",
       "    'ticket_ordering': '0'},\n",
       "   'biz_type': 'tour',\n",
       "   'cityname': '保定市',\n",
       "   'type': '风景名胜;风景名胜相关;旅游景点',\n",
       "   'photos': [],\n",
       "   'typecode': '110000',\n",
       "   'shopinfo': '2',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '涿州古梨苑',\n",
       "   'location': '116.211734,39.565307',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKQLY2M'},\n",
       "  {'parent': [],\n",
       "   'address': '义里路与义里街交叉口西南约140米',\n",
       "   'distance': '4113',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '3.9',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '老北京卤煮',\n",
       "   'location': '116.193947,39.565469',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFH1TBPH'},\n",
       "  {'parent': [],\n",
       "   'address': '义里路与义里街交叉口西约20米',\n",
       "   'distance': '4172',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '2.4',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '山西刀削面',\n",
       "   'location': '116.194349,39.566686',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFMHUGJD'},\n",
       "  {'parent': [],\n",
       "   'address': '义里街与义里路交叉口北约60米',\n",
       "   'distance': '4177',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '大食堂',\n",
       "   'location': '116.194733,39.567117',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0GKXLGZUZ'},\n",
       "  {'parent': [],\n",
       "   'address': '义里街与义里路交叉口北约60米',\n",
       "   'distance': '4185',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '太和板面(义里街店)',\n",
       "   'location': '116.194724,39.567208',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0HA7ZZFR7'},\n",
       "  {'parent': [],\n",
       "   'address': '义里街与义里路交叉路口往西约60米',\n",
       "   'distance': '4202',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;快餐厅;快餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050300',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '农家面馆',\n",
       "   'location': '116.193705,39.566511',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0HKM7DSP6'},\n",
       "  {'parent': [],\n",
       "   'address': '义里路与义里街交叉口西约100米',\n",
       "   'distance': '4218',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '北京烤鸭',\n",
       "   'location': '116.193468,39.566509',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0HKDR2WYY'},\n",
       "  {'parent': [],\n",
       "   'address': '义和庄镇义里路陶营村南',\n",
       "   'distance': '4227',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'biz_type': [],\n",
       "   'cityname': '保定市',\n",
       "   'type': '公司企业;公司;公司',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4b32e6b75eff3b1e079e0159c6be4d0d'}],\n",
       "   'typecode': '170200',\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '涿州聚宝阁餐饮有限公司',\n",
       "   'location': '116.193308,39.566484',\n",
       "   'tel': '13911652553',\n",
       "   'shopid': [],\n",
       "   'id': 'B0G2TA3DUC'},\n",
       "  {'parent': [],\n",
       "   'address': '义里路与幸福路交叉口东240米',\n",
       "   'distance': '4369',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': '00:00-24:00',\n",
       "    'rating': '3.6',\n",
       "    'open_time': '24小时营业',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2fdaf50a284f83b3d4c1d930696ae717'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d0551c76a9fc8fafc35033c1215f8791'}],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '篱笆小院烧烤大排档',\n",
       "   'location': '116.180976,39.539421',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0HA7AY5JT'},\n",
       "  {'parent': [],\n",
       "   'address': '义和庄镇罗家营村永安路三号',\n",
       "   'distance': '4473',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': '09:30-22:30',\n",
       "    'rating': '4.1',\n",
       "    'open_time': '09:30-22:30',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;综合酒楼',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/38f331c50aa3da77f6a1d43a939d7b5c'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/fbc85ac29d062582152ccd4d3758d931'}],\n",
       "   'typecode': '050101',\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '渔阳酒家',\n",
       "   'location': '116.179676,39.540349',\n",
       "   'tel': '15203125081',\n",
       "   'shopid': [],\n",
       "   'id': 'B0HALZ3Y9J'},\n",
       "  {'parent': [],\n",
       "   'address': '永平路与义里街交叉口东约100米',\n",
       "   'distance': '4482',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': '2.6',\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '四季烧烤(义里街店)',\n",
       "   'location': '116.179570,39.540400',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0H6R9A0R5'},\n",
       "  {'parent': [],\n",
       "   'address': '永平路与义里街交叉口东约100米',\n",
       "   'distance': '4483',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': [],\n",
       "    'rating': [],\n",
       "    'open_time': [],\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;中餐厅;中餐厅',\n",
       "   'photos': [],\n",
       "   'typecode': '050100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '小郝餐馆',\n",
       "   'location': '116.179561,39.540407',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0HG69F48V'},\n",
       "  {'parent': [],\n",
       "   'address': '义和庄镇罗家营村平安路3号',\n",
       "   'distance': '4520',\n",
       "   'pname': '河北省',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [],\n",
       "    'opentime2': '09:00-22:00',\n",
       "    'rating': [],\n",
       "    'open_time': '09:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '保定市',\n",
       "   'type': '餐饮服务;餐饮相关场所;餐饮相关',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8a4a5af75d80002a69481bed6c011d0f'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/443f13620404f1f28fc6e002b6d6d3f9'}],\n",
       "   'typecode': '050000',\n",
       "   'shopinfo': '1',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '涿州市',\n",
       "   'name': '宇雪顺饭店',\n",
       "   'location': '116.179121,39.540506',\n",
       "   'tel': '15232220903',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFL10FIQ'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： \n",
    "around_url = \"https://restapi.amap.com/v3/place/around?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"location\":\"116.2317,39.5427\",\n",
    "    \"keywords\":\"美食|风景\"\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=around_url, params=payload) \n",
    "r\n",
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "871432d3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '0',\n",
       " 'infocode': '10000',\n",
       " 'pois': [],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： \n",
    "around_url = \"https://restapi.amap.com/v3/place/around?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"location\":\"116.3,39.9\",\n",
    "    \"keywords\":\"美食\",\n",
    "    \"city\":\"大连\"\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=around_url, params=payload) \n",
    "r\n",
    "r.json()\n",
    "\n",
    "#当用户指定的经纬度和city出现冲突，若范围内有用户指定city的数据，则返回相关数据，否则返回为空。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "9d71f327",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '24',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'distance': '100',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739702',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFGK30QS',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.472970,39.993972',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-17 13:39:59',\n",
       "   'website': [],\n",
       "   'address': '阜荣街10号首开广场地下停车场B3D区-3D62-D61',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '易达新能汽车充电站(首开广场)',\n",
       "   'location': '116.472858,39.993882',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F001020_381227',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '107',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/a1f50792-9f16-44e3-a616-9751c48f22eb.jpeg'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739702',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4001800910',\n",
       "   'id': 'B0FFL2IWAV',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.473171,39.992014',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 10:47:46',\n",
       "   'website': [],\n",
       "   'address': '望京园401号东亚·望京中心A座',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '依威能源汽车充电站(东亚·望京中心A座)',\n",
       "   'location': '116.473152,39.992046',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '118',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739702',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0HR0BP67X',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-18 16:54:08',\n",
       "   'website': [],\n",
       "   'address': '广顺南大街望京园401号(阜通地铁站C东南口步行150米)',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '宝马充电站(宝马站东亚望京中心)',\n",
       "   'location': '116.472710,39.992009',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': 'B0H235QR4E',\n",
       "   'distance': '130',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/d8429d05-39a0-45b0-8f34-bd5542b3e69f.jpg'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739702',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': '万城万充汽车充电站(环球创意广场)',\n",
       "   'tel': '4008083392',\n",
       "   'id': 'B0GUVSW6RD',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.472939,39.993928',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 19:42:27',\n",
       "   'website': [],\n",
       "   'address': '阜荣街10号首开广场地下二层停车场',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': '313',\n",
       "   'exit_location': [],\n",
       "   'name': '万城万充汽车充电站(首开广场)',\n",
       "   'location': '116.472718,39.994135',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F001020_641913',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': 'B0G0XD09NB',\n",
       "   'distance': '378',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/5469b83f-8a6d-48ba-87d6-2ce5c42bd36d.jpg'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739701',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0G0N9ZD9R',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-15 16:07:14',\n",
       "   'website': [],\n",
       "   'address': '广顺北大街33号院215号楼',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': '313',\n",
       "   'exit_location': [],\n",
       "   'name': '望京凯德Mall电动汽车充电站',\n",
       "   'location': '116.468897,39.992102',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '448',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916738820',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFGIM5TV',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 08:28:28',\n",
       "   'website': [],\n",
       "   'address': '悠乐汇西门入口左拐20米(阜通地铁站C东南口步行310米)',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '易达新能汽车充电站(悠乐汇西)',\n",
       "   'location': '116.476046,39.989641',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F001020_640633;387607',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': 'B0FFG7H86E',\n",
       "   'distance': '453',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d9f5937b401b81297bc2a4dceca3af3b'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1f49f7f0d36aa739b523c22c9c7b113f'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3afcceab644a64ed438f7eb78b3e90cd'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916738721',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4006556620',\n",
       "   'id': 'B0FFMEOTPG',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.468422,39.991128',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 19:43:47',\n",
       "   'website': [],\n",
       "   'address': '阜通西大街道路北侧,大西洋新城门前',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': '313',\n",
       "   'exit_location': [],\n",
       "   'name': '华商三优汽车充电站(朝阳区阜通西大街30025充电扬招站)',\n",
       "   'location': '116.468375,39.991257',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': 'B0G0FLB2ZL',\n",
       "   'distance': '529',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '4.7'},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/14f8f59f099e99861473dfe2b26b7653'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/68bf63f96e4a5058ea067a7fc7ee52e4'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/7679dc485eef3fb3c7372251b681c630'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739711',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4001300001',\n",
       "   'id': 'B0FFHVF4QR',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.467162,39.99425',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-17 16:16:13',\n",
       "   'website': [],\n",
       "   'address': '广顺北大街33号地下车库B1、B3',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': '313',\n",
       "   'exit_location': [],\n",
       "   'name': '北京福码大厦汽车充电站',\n",
       "   'location': '116.467326,39.994630',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': 'B0FFMH9JPQ',\n",
       "   'distance': '540',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/dc1471f7f3a4721a8c40fcb92b58e533'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b452a2711e9bb362b5a14e0a824986b9'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4b81f53c3bf7756384741018379c3c7e'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739811',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4000610999',\n",
       "   'id': 'B0FFKYI67V',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.479332,39.994605',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 18:42:11',\n",
       "   'website': [],\n",
       "   'address': '望京街文化产业园1号门附近',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': '302',\n",
       "   'exit_location': [],\n",
       "   'name': '小桔充电站(望京文化产业园)',\n",
       "   'location': '116.479208,39.994492',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '584',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916738712',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4009608068',\n",
       "   'id': 'B0IBARV47K',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 19:41:04',\n",
       "   'website': [],\n",
       "   'address': '望花路与望京中环南路交叉口东北220米',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '汽车充电站(新源恒远公共站075-西八间北里)',\n",
       "   'location': '116.471812,39.987867',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': 'B0H6G5YFUP',\n",
       "   'distance': '652',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/eea2c09d5a3648081b25befe812cf7d9'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1fe472fb6677193d414a3b3746a84e7a'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/4660f3d5e4ae5de508587ab7b3805fa0'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739710',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4001300001',\n",
       "   'id': 'B0G2Z5FJXE',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 18:36:05',\n",
       "   'website': [],\n",
       "   'address': '广顺北大街33号院-6北京市朝阳区广顺北大街33号院',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': '313',\n",
       "   'exit_location': [],\n",
       "   'name': '特来电汽车充电站(北京福泰中心)',\n",
       "   'location': '116.466174,39.995386',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '668',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': '1',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/9dd1bd5d5acd6588b7257370e742a7ec'},\n",
       "    {'title': '1',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/89da47facbb51b4ea72aa35df4ef6061'},\n",
       "    {'title': '1',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/36f0b3e2c9d74074cc5f7d5999ec7716'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739710',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4001300001',\n",
       "   'id': 'B0FFLFFX6C',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 19:02:08',\n",
       "   'website': [],\n",
       "   'address': '广顺北大街33号院',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '特来电充电站(北京福码大厦)',\n",
       "   'location': '116.466057,39.995531',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '672',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916738721',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4006556620',\n",
       "   'id': 'B0HD67CEBG',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.466857,39.989331',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-03-31 16:44:41',\n",
       "   'website': [],\n",
       "   'address': '阜通西大街18号',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '华商三优汽车充电站(朝阳区都市心海岸)',\n",
       "   'location': '116.466997,39.989249',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '724',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/111b03252d9c66e32f4d474909dd9e05'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f0267201390dde23367950768733457e'},\n",
       "    {'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/cf3d3ce1-f9f1-4aae-a243-9ad77695bba2.jpg'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739811',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4001800910',\n",
       "   'id': 'B0FFIPRWJD',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.480833,39.996469',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 10:48:55',\n",
       "   'website': [],\n",
       "   'address': '望京街10号望京SOHO中心T3',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '依威能源汽车充电站(望京SOHO中心T3)',\n",
       "   'location': '116.480645,39.996114',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '736',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739721',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFJKJJ04',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.466623,39.99753',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 16:23:17',\n",
       "   'website': [],\n",
       "   'address': '湖光中街1号(望京地铁站H西南口步行70米)',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '普天新能源汽车充电站(鹏景阁大厦)',\n",
       "   'location': '116.466816,39.997498',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F001020_712131',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '765',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/d5c7897bb5377f50c086e345353aadbd'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/706b0b49e8a5ca818770a466083ade74'},\n",
       "    {'title': [],\n",
       "     'url': 'http://aos-cdn-image.amap.com/sns/ugccomment/0bb40c49-6914-4330-87ae-05ce3cb59c58.jpeg'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916738810',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFLJFH5A',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.475311,39.986466',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 19:41:31',\n",
       "   'website': [],\n",
       "   'address': '望京金兴路10号楼',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '星星充电汽车充电站(长安花园底商北京颐辉物业管理有限责任公司)',\n",
       "   'location': '116.475088,39.986300',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '766',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916738720',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0HAXCL78Q',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-03-23 06:10:20',\n",
       "   'website': [],\n",
       "   'address': '望京街道望京西路48-6号',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '智充充电站(牛充站金隅国际)',\n",
       "   'location': '116.464456,39.991338',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '779',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b43a020bd430ebd076c0b3154f241d99'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/78963714438bf9147205ffa2c018e964'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0b75ebcfb64cfdfc590193b1465e8e61'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916738810',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4008280768',\n",
       "   'id': 'B0FFHARX0I',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.475287,39.986491',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 19:42:24',\n",
       "   'website': [],\n",
       "   'address': '望京金兴路10号楼',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '星星充电汽车充电站(望京长安花园直流快充)',\n",
       "   'location': '116.475081,39.986168',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F001020_668507',\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': 'B0G07C2S1H',\n",
       "   'distance': '833',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739710',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4008288517',\n",
       "   'id': 'B0HKX6N11L',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': [],\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 19:42:26',\n",
       "   'website': [],\n",
       "   'address': '湖光中街甲6号望京港旅大厦(望京地铁站H西南口步行380米)',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': '313',\n",
       "   'exit_location': [],\n",
       "   'name': '云快充汽车充电站(望京港旅大厦充电站)',\n",
       "   'location': '116.464448,39.996401',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'},\n",
       "  {'parent': [],\n",
       "   'distance': '837',\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '1.0'},\n",
       "   'recommend': '0',\n",
       "   'type': '汽车服务;充电站;充电站',\n",
       "   'photos': [],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916739821',\n",
       "   'typecode': '011100',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': [],\n",
       "   'id': 'B0FFH1ZRRL',\n",
       "   'tag': [],\n",
       "   'event': [],\n",
       "   'entr_location': '116.480705,39.998022',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-17 16:55:08',\n",
       "   'website': [],\n",
       "   'address': '望京街10号望京SOHO中心T2地下停车场B2层',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': [],\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': [],\n",
       "   'exit_location': [],\n",
       "   'name': '望京SOHO-地下停车场电动汽车充电站',\n",
       "   'location': '116.480620,39.997911',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': [],\n",
       "   'groupbuy_num': '0'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "import requests\n",
    "\n",
    "around_url = \"https://restapi.amap.com/v3/place/around?parameters\"\n",
    "\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"location\":\"116.473168,39.993015\",\n",
    "    \"types\":\"011100\",  # 编码为01的是汽车服务（大类），11是充电站（中类）\n",
    "    \"radius\":\"1000\",\n",
    "    \"extensions\":\"all\"\n",
    "}\n",
    "\n",
    "r = requests.get(url=around_url, params=payload) \n",
    "r\n",
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "acf7e718",
   "metadata": {},
   "source": [
    "### 多边形搜索  \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "143e2f64",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>参数名</th>\n",
       "      <th>参数名.1</th>\n",
       "      <th>含义</th>\n",
       "      <th>规则说明</th>\n",
       "      <th>是否必须</th>\n",
       "      <th>缺省值</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>key</td>\n",
       "      <td>key</td>\n",
       "      <td>请求服务权限标识</td>\n",
       "      <td>用户在高德地图官网申请Web服务API类型KEY</td>\n",
       "      <td>必填</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>polygon</td>\n",
       "      <td>polygon</td>\n",
       "      <td>经纬度坐标对</td>\n",
       "      <td>规则：经度和纬度用\",\"分割，经度在前，纬度在后，坐标对用\"|\"分割。经纬度小数点后不得超过...</td>\n",
       "      <td>必填</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>keywords</td>\n",
       "      <td>keywords</td>\n",
       "      <td>查询关键字</td>\n",
       "      <td>规则： 多个关键字用“|”分割</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>types</td>\n",
       "      <td>types</td>\n",
       "      <td>查询POI类型</td>\n",
       "      <td>多个类型用“|”分割；可选值：分类代码 或 汉字 （若用汉字，请严格按照附件之中的汉字填写）...</td>\n",
       "      <td>可选</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>offset</td>\n",
       "      <td>offset</td>\n",
       "      <td>每页记录数据</td>\n",
       "      <td>强烈建议不超过25，若超过25可能造成访问报错</td>\n",
       "      <td>可选</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>page</td>\n",
       "      <td>page</td>\n",
       "      <td>当前页数</td>\n",
       "      <td>最大翻页数100</td>\n",
       "      <td>可选</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>extensions</td>\n",
       "      <td>extensions</td>\n",
       "      <td>返回结果控制</td>\n",
       "      <td>此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。</td>\n",
       "      <td>可选</td>\n",
       "      <td>base</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>sig</td>\n",
       "      <td>sig</td>\n",
       "      <td>数字签名</td>\n",
       "      <td>数字签名获取和使用方法</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>output</td>\n",
       "      <td>output</td>\n",
       "      <td>返回数据格式类型</td>\n",
       "      <td>可选值：JSON，XML</td>\n",
       "      <td>可选</td>\n",
       "      <td>JSON</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>callback</td>\n",
       "      <td>callback</td>\n",
       "      <td>回调函数</td>\n",
       "      <td>callback值是用户定义的函数名称，此参数只在output=JSON时有效</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          参数名       参数名.1        含义  \\\n",
       "0         key         key  请求服务权限标识   \n",
       "1     polygon     polygon    经纬度坐标对   \n",
       "2    keywords    keywords     查询关键字   \n",
       "3       types       types   查询POI类型   \n",
       "4      offset      offset    每页记录数据   \n",
       "5        page        page      当前页数   \n",
       "6  extensions  extensions    返回结果控制   \n",
       "7         sig         sig      数字签名   \n",
       "8      output      output  返回数据格式类型   \n",
       "9    callback    callback      回调函数   \n",
       "\n",
       "                                                规则说明 是否必须   缺省值  \n",
       "0                           用户在高德地图官网申请Web服务API类型KEY   必填     无  \n",
       "1  规则：经度和纬度用\",\"分割，经度在前，纬度在后，坐标对用\"|\"分割。经纬度小数点后不得超过...   必填     无  \n",
       "2                                    规则： 多个关键字用“|”分割   可选     无  \n",
       "3  多个类型用“|”分割；可选值：分类代码 或 汉字 （若用汉字，请严格按照附件之中的汉字填写）...   可选   NaN  \n",
       "4                            强烈建议不超过25，若超过25可能造成访问报错   可选    20  \n",
       "5                                           最大翻页数100   可选     1  \n",
       "6       此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。   可选  base  \n",
       "7                                        数字签名获取和使用方法   可选     无  \n",
       "8                                       可选值：JSON，XML   可选  JSON  \n",
       "9            callback值是用户定义的函数名称，此参数只在output=JSON时有效   可选     无  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_html(\"\"\"<div class=\"md-atomic\"><div class=\"table-container\" style=\"width:100%;\"><table class=\"md-table  \" data-meta=\"%7B%22width%22%3A%22100%25%22%7D\"><tbody><tr><th colspan=\"2\" style=\"white-space:nowrap;\"><p>参数名</p></th><th><p>含义</p></th><th><p>规则说明</p></th><th style=\"white-space:nowrap;\"><p>是否必须</p></th><th style=\"white-space:nowrap;\"><p>缺省值</p></th></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>key</p></td><td><p>请求服务权限标识</p></td><td><p>用户在高德地图官网<a href=\"https://lbs.amap.com/dev/\" class=\"\" target=\"_blank\">申请Web服务API类型KEY</a></p></td><td style=\"white-space:nowrap;\"><p>必填</p></td><td style=\"white-space:nowrap;\"><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>polygon</p></td><td><p>经纬度坐标对</p></td><td><p>规则：经度和纬度用\",\"分割，经度在前，纬度在后，坐标对用\"|\"分割。经纬度小数点后不得超过6位。 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;多边形为矩形时，可传入左上右下两顶点坐标对；其他情况下首尾坐标对需相同。</p></td><td style=\"white-space:nowrap;\"><p>必填</p></td><td style=\"white-space:nowrap;\"><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>keywords</p></td><td><p>查询关键字</p></td><td><p>规则： 多个关键字用“|”分割</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td style=\"white-space:nowrap;\"><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>types</p></td><td><p>查询POI类型</p></td><td><p>多个类型用“|”分割；</p><p>可选值：分类代码 或 汉字 （若用汉字，请严格按照附件之中的汉字填写）&nbsp;</p><p>分类代码由六位数字组成，一共分为三个部分，前两个数字代表大类；中间两个数字代表中类；最后两个数字代表小类。</p><p>若指定了某个大类，则所属的中类、小类都会被显示。</p><p>例如：010000为汽车服务（大类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010100为加油站（中类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010101为中国石化（小类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010900为汽车租赁（中类）</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;010901为汽车租赁还车（小类）</p><p>当指定010000，则010100等中类、010101等小类都会被包含。</p><p>当指定010900，则010901等小类都会被包含</p><p><a href=\"https://lbs.amap.com/api/webservice/download\" class=\"\" target=\"_blank\">下载POI分类编码和城市编码表 </a>&nbsp;&nbsp;</p><p><br></p><p><strong>当keywords和types为空的时候，</strong> <strong>我们会默认指定types为120000（商务住宅）&amp;150000（交通设施服务）</strong>&nbsp;</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td style=\"white-space:nowrap;\"><p><br></p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>offset</p></td><td><p>每页记录数据</p></td><td><p>强烈建议不超过25，若超过25可能造成访问报错</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td style=\"white-space:nowrap;\"><p>20</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>page</p></td><td><p>当前页数</p></td><td><p>最大翻页数100</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td style=\"white-space:nowrap;\"><p>1</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>extensions</p></td><td><p>返回结果控制</p></td><td><p>此项默认返回基本地址信息；取值为all返回地址信息、附近POI、道路以及道路交叉口信息。</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td style=\"white-space:nowrap;\"><p>base</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>sig</p></td><td><p>数字签名</p></td><td><p><a href=\"https://lbs.amap.com/faq/account/key/72\" class=\"\" target=\"_blank\">数字签名获取和使用方法</a></p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td style=\"white-space:nowrap;\"><p>无</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>output</p></td><td><p>返回数据格式类型</p></td><td><p>可选值：JSON，XML</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td style=\"white-space:nowrap;\"><p>JSON</p></td></tr><tr><td colspan=\"2\" style=\"white-space:nowrap;\"><p>callback</p></td><td><p>回调函数</p></td><td><p>callback值是用户定义的函数名称，此参数只在output=JSON时有效</p></td><td style=\"white-space:nowrap;\"><p>可选</p></td><td style=\"white-space:nowrap;\"><p>无</p></td></tr></tbody></table></div></div>\"\"\")[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "0439b8ee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '3',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': 'B0FFF5UV26',\n",
       "   'address': '花家地小区1号商业楼',\n",
       "   'distance': [],\n",
       "   'pname': '北京市',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '30.00',\n",
       "    'opentime2': '06:00-22:00',\n",
       "    'rating': '4.8',\n",
       "    'open_time': '06:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '北京市',\n",
       "   'type': '餐饮服务;快餐厅;肯德基',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/be1d148709c9307f451ec7d293c370c5'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cf64ea8e22533b4bba864a3b10c322fb'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0fa22626ef3c5ebb530d153cc0967b64'}],\n",
       "   'typecode': '050301',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '朝阳区',\n",
       "   'name': '肯德基(花家地店)',\n",
       "   'location': '116.469232,39.985570',\n",
       "   'tel': '4009200715',\n",
       "   'shopid': [],\n",
       "   'id': 'B000A7BM4H'},\n",
       "  {'parent': 'B0FFG4VQTD',\n",
       "   'address': '望京南湖东园201号楼1层',\n",
       "   'distance': [],\n",
       "   'pname': '北京市',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '48.00',\n",
       "    'opentime2': '每天00:00-22:00',\n",
       "    'rating': '4.6',\n",
       "    'open_time': '00:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '北京市',\n",
       "   'type': '餐饮服务;快餐厅;肯德基',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/be1d148709c9307f451ec7d293c370c5'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/53a383b0a310b133764f7171'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/6e2d247199cccf317d80088098ecd462'}],\n",
       "   'typecode': '050301',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '202',\n",
       "   'adname': '朝阳区',\n",
       "   'name': '肯德基(中福百货店)',\n",
       "   'location': '116.463368,40.000511',\n",
       "   'tel': '4009208801',\n",
       "   'shopid': [],\n",
       "   'id': 'B000A7FVJQ'},\n",
       "  {'parent': [],\n",
       "   'address': '望京西园4区410号学生宿舍1层',\n",
       "   'distance': [],\n",
       "   'pname': '北京市',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '35.00',\n",
       "    'opentime2': '10:00-22:00',\n",
       "    'rating': '4.5',\n",
       "    'open_time': '10:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '北京市',\n",
       "   'type': '餐饮服务;快餐厅;肯德基',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/be1d148709c9307f451ec7d293c370c5'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/16cfe87ab6592e008358292b6736c89f'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2614d1c30078ddaefd25dee77ae85130'}],\n",
       "   'typecode': '050301',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '朝阳区',\n",
       "   'name': '肯德基(望京西店)',\n",
       "   'location': '116.473942,39.997773',\n",
       "   'tel': '4009208801',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFKEPXS2'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： \n",
    "polygon_url = \"https://restapi.amap.com/v3/place/polygon?parameters \"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"polygon\":\"116.460988,40.006919|116.48231,40.007381|116.47516,39.99713|116.472596,39.985227|116.45669,39.984989|116.460988,40.006919\",\n",
    "    \"keywords\":\"肯德基\",\n",
    "    \"types\":\"050301\"\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=polygon_url, params=payload) \n",
    "r\n",
    "r.json()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c004749a",
   "metadata": {},
   "source": [
    "### ID查询"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "1017a540",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>参数名</th>\n",
       "      <th>参数名.1</th>\n",
       "      <th>含义</th>\n",
       "      <th>规则说明</th>\n",
       "      <th>是否必须</th>\n",
       "      <th>缺省值</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>key</td>\n",
       "      <td>key</td>\n",
       "      <td>请求服务权限标识</td>\n",
       "      <td>用户在高德地图官网申请Web服务API类型KEY</td>\n",
       "      <td>必填</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>id</td>\n",
       "      <td>id</td>\n",
       "      <td>AOI唯一标识</td>\n",
       "      <td>最多可以传入1个id，传入目标区域的poiid即可</td>\n",
       "      <td>必填</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>sig</td>\n",
       "      <td>sig</td>\n",
       "      <td>数字签名</td>\n",
       "      <td>数字签名获取和使用方法</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>callback</td>\n",
       "      <td>callback</td>\n",
       "      <td>回调函数</td>\n",
       "      <td>callback值是用户定义的函数名称，此参数只在output=JSON时有效</td>\n",
       "      <td>可选</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        参数名     参数名.1        含义                                     规则说明 是否必须  \\\n",
       "0       key       key  请求服务权限标识                 用户在高德地图官网申请Web服务API类型KEY   必填   \n",
       "1        id        id   AOI唯一标识                最多可以传入1个id，传入目标区域的poiid即可   必填   \n",
       "2       sig       sig      数字签名                              数字签名获取和使用方法   可选   \n",
       "3  callback  callback      回调函数  callback值是用户定义的函数名称，此参数只在output=JSON时有效   可选   \n",
       "\n",
       "  缺省值  \n",
       "0   无  \n",
       "1   无  \n",
       "2   无  \n",
       "3   无  "
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.read_html(\"\"\"<div class=\"md-atomic\"><div class=\"table-container\" style=\"width:100%;\"><table class=\"md-table  \" data-meta=\"%7B%22width%22%3A%22100%25%22%7D\"><tbody><tr><th colspan=\"2\"><p>参数名</p></th><th><p>含义</p></th><th><p>规则说明</p></th><th><p>是否必须</p></th><th><p>缺省值</p></th></tr><tr><td colspan=\"2\"><p>key</p></td><td><p>请求服务权限标识</p></td><td><p>用户在高德地图官网<a href=\"https://lbs.amap.com/dev/\" class=\"\" target=\"_blank\">申请Web服务API类型KEY</a></p></td><td><p>必填</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\"><p>id</p></td><td><p>AOI唯一标识</p></td><td><p>最多可以传入1个id，传入目标区域的poiid即可</p></td><td><p>必填</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\"><p>sig</p></td><td><p>数字签名</p></td><td><p><a href=\"https://lbs.amap.com/faq/account/key/72\" class=\"\" target=\"_blank\">数字签名获取和使用方法</a></p></td><td><p>可选</p></td><td><p>无</p></td></tr><tr><td colspan=\"2\"><p>callback</p></td><td><p>回调函数</p></td><td><p>callback值是用户定义的函数名称，此参数只在output=JSON时有效</p></td><td><p>可选</p></td><td><p>无</p></td></tr></tbody></table></div></div>\"\"\")[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "7304ae17",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'count': '1',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': 'B0FFF5UV26',\n",
       "   'distance': [],\n",
       "   'pcode': '110000',\n",
       "   'importance': [],\n",
       "   'biz_ext': {'cost': '30.00',\n",
       "    'opentime2': '06:00-22:00',\n",
       "    'rating': '4.8',\n",
       "    'open_time': '06:00-22:00',\n",
       "    'meal_ordering': '0'},\n",
       "   'recommend': '0',\n",
       "   'type': '餐饮服务;快餐厅;肯德基',\n",
       "   'photos': [{'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/be1d148709c9307f451ec7d293c370c5'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cf64ea8e22533b4bba864a3b10c322fb'},\n",
       "    {'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/0fa22626ef3c5ebb530d153cc0967b64'}],\n",
       "   'discount_num': '0',\n",
       "   'gridcode': '5916738701',\n",
       "   'typecode': '050301',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'citycode': '010',\n",
       "   'adname': '朝阳区',\n",
       "   'children': [],\n",
       "   'alias': [],\n",
       "   'tel': '4009200715',\n",
       "   'id': 'B000A7BM4H',\n",
       "   'tag': '葡式蛋挞,小食拼盘,KFC老北京鸡肉卷,蔬菜沙拉,薯条,芋缘花淇淋,伴柠伴桔鲜果茶,鸡米花,吮指原味鸡,香辣鸡翅,全家桶,新奥尔良烤鸡腿堡,玉米沙拉,可乐,现磨咖啡,KFC香辣（劲脆）鸡腿堡,KFC芋缘花淇淋,海苔岩烧大鸡腿饭,红豆派,黄金鸡块,肯大大鸡排,醇香土豆泥',\n",
       "   'event': [],\n",
       "   'entr_location': '116.469414,39.985729',\n",
       "   'indoor_map': '0',\n",
       "   'email': [],\n",
       "   'timestamp': '2022-04-19 15:29:07',\n",
       "   'website': [],\n",
       "   'address': '花家地小区1号商业楼',\n",
       "   'adcode': '110105',\n",
       "   'pname': '北京市',\n",
       "   'biz_type': 'diner',\n",
       "   'cityname': '北京市',\n",
       "   'postcode': [],\n",
       "   'match': '0',\n",
       "   'business_area': '望京',\n",
       "   'indoor_data': {'cmsid': [], 'truefloor': [], 'cpid': [], 'floor': []},\n",
       "   'childtype': '202',\n",
       "   'exit_location': [],\n",
       "   'name': '肯德基(花家地店)',\n",
       "   'location': '116.469232,39.985570',\n",
       "   'shopid': [],\n",
       "   'navi_poiid': 'J50F001020_425283',\n",
       "   'groupbuy_num': '0'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. 调用requests模块（google chrome 浏览器）\n",
    "import requests\n",
    "# 2. 请求方法 ： GET\n",
    "# 3. URL地址 ： \n",
    "detail_url = \"https://restapi.amap.com/v3/place/detail?parameters\"\n",
    "# 4. 准备参数，用于交换数据 payload\n",
    "payload = {\n",
    "    \"key\":\"1fa7097e8424ae1a70b966011fda5a0a\",\n",
    "    \"id\":\"B000A7BM4H\"\n",
    "}\n",
    "# 5. 发起请求\n",
    "r = requests.get(url=detail_url, params=payload) \n",
    "r\n",
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "af6ff88e",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
